js数据类型

2021-04-25 20:29

阅读:509

标签:abc   har   bool   char   oct   doc   body   没有   head   

DOCTYPE html>
html lang="en">
head>
    meta charset="UTF-8">
    title>Documenttitle>
    
    script>
        //定义number类型
        var num = 1;
        var num2 = 1.2;
        var num3 = NaN;

        //输出到页面上
        document.write(num+"
"); document.write(num2+"
"); document.write(num3+"
"); //定义string类型 var str = "abc"; var str2 = adf; document.write(str+"
"); document.write(str2+"
"); //定义bollean var flag = true; document.write(flag+"
"); //定义null,undefined var obj = null; var obj2 = undefined; var obj3 ; document.write(obj+"
"); document.write(obj2+"
"); document.write(obj3+"
"); script> head> body> body> html>

 

js数据类型

标签:abc   har   bool   char   oct   doc   body   没有   head   

原文地址:https://www.cnblogs.com/987m/p/12227887.html


评论


亲,登录后才可以留言!