find error this program | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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>

23rd Jan 2018, 11:47 AM
lal bahadur Verma
lal bahadur Verma - avatar
4 Answers
+ 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>
23rd Jan 2018, 4:10 PM
Prashanth Kumar
Prashanth Kumar - avatar
+ 2
how to use onclick
23rd Jan 2018, 12:34 PM
lal bahadur Verma
lal bahadur Verma - avatar
+ 2
okk
23rd Jan 2018, 7:16 PM
lal bahadur Verma
lal bahadur Verma - avatar
0
onclick not onClick
23rd Jan 2018, 12:28 PM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar