document.cookie="cookieName=value;expires="+打开网页时间+15秒
解决方案 »
- 哪位javascript高手来帮我一下
- 使用一段javascript对页面的表格排序,E文和数字类型的没问题,现重金悬赏中文解决方案
- 请问如何可以改变input的disabled为true时的样式?
- juery如何获取json中role.remark的值
- 请问能否动态定义input元素的隐藏,即.type="hidden".
- 请问大虾怎样让主板上的喇叭鸣叫?急!谢谢!
- web对话框的这个缺陷如何解决?
- 如何把文本框的焦点定在文本框的文字之后。
- Web方式下,如何在客户端控制Server的端口(比如串口或并口)
- 同一个表单用同一个按钮实现两次提交.如何实现?
- 使js与oracle数据库相连的问题!!!!!!!
- 请问如何设置一个cookie为15秒后过期,并在这15秒内其它浏览器还能访问它?
++++=================== test.htm =========
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<form name="form1" method="post" action="">
<p>
<select name="select" onchange="window.open('lizi.htm')">
<option>1</option>
<option>2</option>
</select>
</p>
<p>
<input type="text" name="textfield">
</p>
</form>
<script>
var str=document.location.search
var str2=str.split("=")
document.form1.textfield.value=str2[1];
</script>
</body>
</html>========== lizi.htm ===========
<html>
<head>
<title>无标题文档</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function test(){
opener.location.href=opener.location+"?form1="+document.form1.textfield.value
opener.location.reload()
self.close()
}
</script>
</head><body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="">
<input type="text" name="textfield">
<br>
<input type="submit" name="Submit" value="提交" onclick="test()">
</form>
</body>
</html>
test.htm
===========
<script>
var str=document.location.search
if(str) {
var str2=str.split("=")
document.form1.textfield.value=str2[1];
}
</script>