Javascript 弹出窗口的值获取
我用JavaScript的window.open做出了一用户查询窗口,当我点击弹出窗口的“执行查询”按钮时,没有响应弹出窗口的JavaScript的函数execSearch的值,我不知道怎么回事,请各位大使指教!
代码如下:
<html>
<head>
<title> </title>
<meta http-equiv= "Content-Type " content= "text/html; charset=gb2312 ">
<link href= "../Styles.css " rel= "stylesheet " type= "text/css ">
<script language= "JavaScript ">
<!--
function execSearch(){
var txtname=document.getElementById( "name ")
var txtshenfenzheng=document.getElementById( "shenfengzheng ")
var txtaddress=document.getElementById( "address ")
window.alert(\ "a=\ "+txtname,\ "b=\ "+txtshenfenzheng,\ "c=\ "+txtaddress)
}
function closeit() {
setTimeout( "self.close() ",10000) //毫秒
}
//-->
</script>
</head>
<body onload= "closeit() ">
<div align= "center ">
<form name= "form1 ">
<table width= "60% " border= "0 ">
<tr>
<td colspan= "2 "> <div align= "center "> <strong> 用户信息查询 </strong> </div> </td>
</tr>
<tr>
<td width= "36% "> <div align= "left "> 姓名: </div> </td>
<td width= "64% "> <div align= "left ">
<input type= "text " name= "name ">
</div> </td>
</tr>
<tr>
<td> <div align= "left "> 身份证: </div> </td>
<td> <div align= "left ">
<input type= "text " name= "shenfengzheng ">
</div> </td>
</tr>
<tr>
<td> <div align= "left "> 地址: </div> </td>
<td> <div align= "left ">
<input type= "text " name= "address ">
</div> </td>
</tr>
</table>
<table width= "60% " border=