源码论坛,商业源码下载,尽在锦尚中国商业源码论坛
标题:
求助,表单提交好是乱码...
[打印本页]
作者:
umss7301
时间:
2016-1-14 15:35
标题:
求助,表单提交好是乱码...
这是一个祝福网页,提交名字后显示的是乱码,请高手帮我看下代码那里错了,从早上鼓捣到现在也没有找出问题来...拜托了{:2_220:} !!!
============================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>生日祝福网页</title>
<SCRIPT language="javascript">
var lusername =location.search.split("=")[1];
if(!lusername){
lusername="小王";
}
else{
lusername=unescape(lusername);
}
function check(obj){
if (obj.stra.value.length>8) {
alert('太长');
return false;
}
if (obj.stra.value.length==0) {
alert('还没填写姓名呀');
return false;
}
var url="http://"+location.host+location.pathname+"?stra="+escape(obj.stra.value);
window.clipboardData.setData("Text",url);
alert('网址已生成并替您复制好了,直接粘贴到QQ或邮箱就可以了\n\n您的朋友 一定会很惊喜,快快发送吧!');
window.location.replace(url);
return false;
}
</SCRIPT>
</head>
<body>
<table width="600" border="0" align="center">
<tr>
<td><SCRIPT>document.write(lusername)</SCRIPT>:祝福你节日快乐!</td>
</tr>
<tr>
<td><img src="http://pic17.nipic.com/20111110/3992420_192949023336_2.jpg" width="640" height="480" /></td>
</tr>
<tr>
<td><div align="center">在空白处写上朋友的名字,再点《点此提交》</div></td>
</tr>
<tr>
<td>
<form name="newinfo_form">
<p align="center">
<input id="stra" style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体" tabIndex"1" maxLength="8" size="16" name="name">
<font size="4" style="line-height: 150%; word-break: break-all">
<input style="FONT-FAMILY: 宋体" type="submit" value="点此提交" name="Submit">
</font></p>
</form>
</td>
</tr>
</table>
</body>
</html>
====================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>生日祝福网页</title>
<SCRIPT language="javascript">
var lusername =location.search.split("=")[1];
if(!lusername){
lusername="小王";
}
else{
lusername=unescape(lusername);
}
function check(obj){
if (obj.stra.value.length>8) {
alert('太长');
return false;
}
if (obj.stra.value.length==0) {
alert('还没填写姓名呀');
return false;
}
var url="http://"+location.host+location.pathname+"?stra="+escape(obj.stra.value);
window.clipboardData.setData("Text",url);
alert('网址已生成并替您复制好了,直接粘贴到QQ或邮箱就可以了\n\n您的朋友 一定会很惊喜,快快发送吧!');
window.location.replace(url);
return false;
}
</SCRIPT>
</head>
<body>
<table width="600" border="0" align="center">
<tr>
<td><SCRIPT>document.write(lusername)</SCRIPT>:祝福你节日快乐!</td>
</tr>
<tr>
<td><img src="http://pic17.nipic.com/20111110/3992420_192949023336_2.jpg" width="640" height="480" /></td>
</tr>
<tr>
<td><div align="center">在空白处写上朋友的名字,再点《点此提交》</div></td>
</tr>
<tr>
<td>
<form name="newinfo_form" onSubmit="return check(this)">
<p align="center">
<input id="stra" style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体" tabIndex"1" maxLength="8" size="16" name="name">
<font size="4" style="line-height: 150%; word-break: break-all">
<input style="FONT-FAMILY: 宋体" type="submit" value="点此提交" name="Submit">
</font></p>
</form>
</td>
</tr>
</table>
</body>
</html>
复制代码
作者:
umss7301
时间:
2016-1-17 22:01
我以为在这里可得到帮助...
欢迎光临 源码论坛,商业源码下载,尽在锦尚中国商业源码论坛 (https://bbs.52jscn.com/)
Powered by Discuz! X3.3