0
javascript value property dose not working?
name : <input id= "myText" type="text" value= "mickey"> <p>Click to change the value </p> <button onclick="myFunciton()"> try it</button> <script type="text/javascript"> function myFunciton(){ var x = document.getElementById("myText"); x.value("jewel"); } </script>
5 Respuestas
+ 1
well as the error said, its not a function
try x.value = "jewel"
0
showed into the console panel.
index.html:16 Uncaught TypeError: x.value is not a function
at myFunciton (index.html:16)
at HTMLButtonElement.onclick (index.html:12)
0
Please link your code here
0
Thank you teste! you are right
0
actually when i am practicing the code segment that time occured the error.