search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

4 answers
Q&A Why is there a semicolon after the statement document.Write();? And window.alert() is not used?

0

<!DOCTYPE HTML>
<html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 <title>php.cn</title>
 <script type="text/javascript">
 //在<body>中输出一句话
 document.write("欢迎来到php.cn");
 window.alert("Sorry,The paassword your input is uncorrect,Please try again!")
 </script>
 </head>
 <body>
 </body>
</html>

Your Answer
submit

4 answers
0

You can add it or not

2018-03-12 08:39:53

submit

0

You don’t need to add

, just change the line

2018-03-12 18:27:17

submit

0

Characteristics of the JavaScript language:

There is no need to add a semicolon after each statement. This is the case when only one statement is written in one line;

If multiple statements are written in one line, each statement It is necessary to use a semicolon to separate;

But most languages ​​require a semicolon at the end. In order to get used to it

so, it is voluntary to add it or not, but it is recommended to add it

2018-03-17 23:58:36

submit

0

You can omit the last line, but it is not recommended

2018-03-20 17:38:17

submit

Popular tool

vc9-vc14 (32+64 bit) runtime library collection (link below)

vc9-vc14 (32+64 bit) runtime library collection (link below)

Download the collection of runtime libraries required for phpStudy installation

VC9 32-bit

VC9 32-bit

VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version

PHP programmer toolbox full version

Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit

VC11 32-bit

VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use