+ 1
find error this program
<!DOCTYPE html> <html> <head> <title>javaScript</title> </head> <body bgcolor="#fff0f0"> Name: <input type="text"id="field1" value=""> <br> <button onClick= "alert"('Hi' +document.getElementById('field1').value +', welcome to oxygen')">click</button> </body> </html>
4 Antworten
+ 6
quotes err "
☺
try this
<!DOCTYPE html>
<html>
<head>
<title>javaScript</title>
</head>
<body bgcolor="#fff0f0">
Name: <input type="text"id="field1" value="">
<br>
<button onClick= "alert('Hi' +document.getElementById('field1').value +', welcome to oxygen')">click</button>
</body>
</html>
+ 2
how to use onclick
+ 2
okk
0
onclick not onClick