程序代码:
<html> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <head> <title>test</title> <script type="text/javascript"> function kit(){ var szString = document.window_name.value || b_c_c_n; } document.btn.onchange = kit; </script> </head> <body> <input type="button" name="btn" value="open window"></input> <input type="text" name="window_name" size="20"></input> </body> </html>
为什么 取不到 btn 和 window_name对象
Firebug msg: document.btn is undefined
Line 9