javascript - why this code has error -
//this part of html code <form> <b>user:</b> <input type="text" name="user" size="25"/> <input type="button" name ="submit" value="confirm" onclick= "mehdi(this.form)"/> </form> <script type="text/javascript"> function mehdi(rno){ rno.user.value = 2 * math.pi ;//this error line user unknown alert(rno); return rno; } </script>
what can do?
try this
<form> <b>user:</b> <input type="text" name="user" size="25"/> <input type="button" name ="submit" value="confirm" onclick= "mehdi(this.form)"> </form> <script type="text/javascript"> function mehdi(rno) { rno.user.value = 2 * math.pi ;//this error line user unknown alert(rno.user.value); return rno.user.value; } </script>
Comments
Post a Comment