Home > Web Front-end > JS Tutorial > A debugging problem caused by JS semicolon_javascript skills

A debugging problem caused by JS semicolon_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 18:51:35
Original
975 people have browsed it

Look at the following code:
var a=textbox1.text;
var b=5;
if(a{
a=b;
}
Look at the effect after execution. No matter what the value of textbox1.text is, the condition will be judged. Why? Have you found anything?
It turns out that when I was writing the code, there was an extra semicolon here in if(aNote: What I just wrote down, When I opened it again, there was no content. So I simplified it a bit. I wrote a general meaning

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Where is js written?
From 1970-01-01 08:00:00
0
0
0
js file code not found
From 1970-01-01 08:00:00
0
0
0
js addClass not working
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template