<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="JavaScript">
function SetDoType(str)
{
window.document.form2.hiddenField.Value = str;
alert(window.document.form2.hiddenField.Value);
}
</script>
</head><body>
<form name="form2" method="get" action="">
<input type="submit" name="Submit" value="提交" onClick="SetDoType('qqq')">
<input type="hidden" name="hiddenField">
</form></body>
</html>window document的大小写问题。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="JavaScript">
function SetDoType(str)
{
window.document.form2.hiddenField.Value = str;
alert(window.document.form2.hiddenField.Value);
}
</script>
</head><body>
<form name="form2" method="get" action="">
<input type="submit" name="Submit" value="提交" onClick="SetDoType('qqq')">
<input type="hidden" name="hiddenField">
</form></body>
</html>window document的大小写问题。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货