亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

?????? ??? ??

JavaScript? ??? ??

JavaScript?? ?? ??? ?? 6?? ??? ??? ????.

??? ?? ????????????????????????????????> com", 'string' ?? ? ?? ??? ??? ??? ?? ??(???? ??? ?? ?? ?? ???? ??) 30, -10, 11.2, 2.35e10 ??? ??? true ?? false? ? ?? ??? ?????. 5 = = 2 ?? ??? false

Null ? ?? ?? ?? ?? ?? ????(null). ??? null ?? ???? ??? ??? ?? ? ????. str = null

Undefine type ??? ??? ? , ??? ?? ???? ?????. ? ???? ??? ?? ????: undefine var str

?? ?? ??? ?? ?? ?? JavaScript? ???? ?? document.getElementById("article")

??? ??


??? ??? ???? " ?? ????? '? ?? ????. ??? ? ?? ????.

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>php中文網(wǎng)(php.cn)</title> 
<script type="text/javascript">
var str1 = '20 ';
var str2 = '歲';
alert( str1 + str2 );
</script>
</head>
<body>
</body>
</html>

? ???? ?? + ??? ???? ???? ??? ? ????. ?? ????, ???? ??? ???? ??? ?????:

20?


??: ??? ??? ??? JavaScript?? ??? ??? ?? ??? ? ????


?? ??

?? ???? ??? ?? ?? ? ?? ??? ??(???? ??? ?? ?? ??? ???? ??)? ?????.

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>php中文網(wǎng)(php.cn)</title> 
<script type="text/javascript">
var num1 = 20;
var num2 = 33.5;
alert( num1 + num2 );
</script>
</head>
<body>
</body>
</html>

? ?? ???? ???? ??? ???? ?????. ?? ??? ??? ????. 53.5

??? ??? ?? ??? + ??? ?? ???? ?? ?? ???? ???? ??? ???? ??? ?????. ??? ?? ???? num1? num2? ???? ?? ()? ??? ?? ????? ????.


Boolean ??

Boolean ??? ???? true?? ??? true??, ??? ??? false???. ????? ?? ?? ?? if ?? ???? ??? ??? ????.

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>php中文網(wǎng)(php.cn)</title> 
    <script type="text/javascript">
    var x = 3;
    var y = 5;
    if( x == y ){
    alert( "x 等于 y");
    }else{
    alert( "x 不等于 y" );
    }
    </script>
</head>
<body>
</body>
</html>

Null(Null)

Null ? ??? ??? ??? ?? ??? ?????. ?? ??, ?? ??? ?? ??? ??? ?? ? JavaScript? ???? ??? ?? ?? ??? ?? ???? ?? ??? null???.

null ??? ????? ??? ??? null? ???? ???.

if( x == null ) { ... }

? ??? ?? ??? ???? , ?? ? ?? ??? ???? ??? ??? null ?? ???? ??? ??? ?? ? ????.

???? ?? ??

??? ??? ? ??? ??? ?? ??? ?? ??? ???? ?? ?????. ???? ?? ??? ?? ?? ???? ????? ?? ?? ?? ??? ???? ?? ???? ????? ???? ?? ??? ???? ???.

if( x == undefine ) { ... }

Object type

?? ??? JavaScript?? ????? ???? ?????. ?? ?? document.getElementById()? ?? ??? ??? ??? ? ?? ?? ?????.

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>php中文網(wǎng)(php.cn)</title> 
    <script language="JavaScript">
    x = document.getElementById("article");
    alert(x);
    </script>
</head>
<body>
 <p id="article">我是一些文字 ...</p>
</body>
</html>

?? ?? ??

? ??? ??? ? "new" ???? ???? ?? ??? ??? ? ????.

var carname=new String;
var x= new Number;
var y= new Boolean ;
var ???= ? ??;
var ??= ? ??;





???? ??
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php中文網(wǎng)(php.cn)</title> <script language="JavaScript"> var age = 15; if (age >= 18) { alert('adult'); } else { alert('teenager'); } </script> </head> <body> </body> </html>