<分区>
在下面的代码中,值不会从一个页面传递到另一个页面。
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<script type="text/javascript">
function generateRow() {
var myvar = "testuser";
'<%Session["temp"] = "' + myvar +'"; %>';
window.location = "WebForm2.aspx";
}
</script>
<head>
<title></title>
</head>
<body>
<div runat="server">
<input id="Button1" type="button" onclick="generateRow()" value="button" />
</div>
</body>
</html>
上面的代码有什么问题?