为什么运行此程序没有反应啊。。。。。。。急需!!!
这是我完整的程序代码。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> </head> <body> <form> 请输入姓名 <input type="text" value="你好" size="10" name="yname"> <input type="button" value="确定" onclick="MSG()" name="btn"> </form> <script> //根据输入的信息,在按钮上显示欢迎信息 function MSG(){ var str1=documnet.forms[0].yname.value; var str2="你好"; var Msg=str1+str2+"!"; document.forms[0].btn.value=Msg; document.write(Msg); } </script> </body> </html>
评论