+ 2

Line:1

when i write the example code(alert box) i see error:Uncaught SyntaxError:Unexpected token< Line:1 what is the problem?

11th Feb 2017, 7:22 PM
Reza Nasiri
Reza Nasiri - avatar
7 Answers
+ 5
you put the html in the JS section. so everything will be interpreted as JavaScript which leads to the error. take a look at other web codes on code playground to see how to split the codes ;)
11th Feb 2017, 7:28 PM
Mario L.
Mario L. - avatar
+ 2
sometimes the web browser execute the JavaScript code but sometimes I get a blank page????? what may be the problem?
12th Feb 2017, 6:15 AM
Noman Noor Ali Shah
Noman Noor Ali Shah - avatar
+ 1
سلام رضا اشتباه این بود که کد اچ تی ام ال رو تو JS هم نوشته بودی
13th Feb 2017, 4:03 PM
Ali Huseiny
Ali Huseiny - avatar
+ 1
والیکم سلام ali you speak Persian
13th Feb 2017, 6:04 PM
Noman Noor Ali Shah
Noman Noor Ali Shah - avatar
0
salam ali are motevajeh eshtebaham shodam.akhe in avalin zaban hast ke daram yad migiram.albateh aghaye mario laurisch be khobi hamon moghe tozih dad.mamnonam.
13th Feb 2017, 6:01 PM
Reza Nasiri
Reza Nasiri - avatar
0
خواهش رضا جان
14th Feb 2017, 2:10 AM
Ali Huseiny
Ali Huseiny - avatar
0
Yes Noman I speak Persian
14th Feb 2017, 2:10 AM
Ali Huseiny
Ali Huseiny - avatar