哪错了....
var f=document.form1;
var usrName=f.userName.value;
用户名: <input type= "text " id= "userName " name= "userName " value= " ">
提示userName为空或不是对像...
------解决方案--------------------那你输入个值再试试看
或var usrName=document.GetElemengById( "userName ").value;
------解决方案--------------------var usrName=document.getElementById( "userName ");
alert(usrName.value);
------解决方案--------------------通过document.GetElemengById( "userName ").Value来获取值
------解决方案--------------------var f=document.form1( "userName ");
alert(f.value );