js获取前台页面中的值

 test1.html代码:
<html>
<head>
<title> TEST1 </title>
</head>
<body>
<script type="text/javascript">
function submit()
{
var input1= document.getElementByIdx("inputid");
window.open("test2.html?keyword=" + input1.value);//传入参数
}
</script>
<input type="text" id="inputid">
<input type="button" onclick="submit()" value="提交">
</body>
</html>
posted @ 2011-08-11 17:54  风一样的大叔  阅读(497)  评论(0编辑  收藏  举报