javaScript 外部 变量 伪类URL

您所在的位置:网站首页 url的定义及组成 javaScript 外部 变量 伪类URL

javaScript 外部 变量 伪类URL

2023-04-03 02:38| 来源: 网络整理| 查看: 265

1、外部:

(要在js中创建)

            

2、定义变量

输出如下:

 

            //定义变量             var id=1             var name="tom",phone="11011325643",xhao="小米";                          document.write("学号:" + id + "");             document.write("姓名:" + name + "");             document.write("手机:" + phone + "");             document.write("型号:" + xhao + "");                      

第二种:

             var a=-10/0;              var b="abc";

                         // 输出变量的类型             document.write(typeof a);                 // 阿拉伯数字 number              document.write("");             document.write(typeof b);                 //  数字等         string             document.write("");

3、伪类URL

点击 or 确定 消息框提示

        点击                           

 



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3