侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130555 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

javascript(四) var关键字/注释/noscript

2024-05-09 星期四 / 0 评论 / 0 点赞 / 5 阅读 / 5075 字

var关键字/注释 如果使用var 声明变量 说明变量是局部变量,如果不使用var 声明变量 就是全局变量。不过一定要谨慎使用全局变量,注意全局变量可以多个js文件共享。 注释: 第一种注释:/

                                                     var关键字/注释

  如果使用var 声明变量 说明变量是局部变量,如果不使用var 声明变量 就是全局变量。不过一定要谨慎使用全局变量,注意全局变量可以多个js文件共享。

  注释:

  第一种注释://

  第二种注释:/* */

  第三种注释 //<![CDATA[    xxx内容    //  ]]>

  当有些浏览器不支持javascript的时候,使用noscript标签

<noscript> xxxxxx</noscript>

javascript关键字

abstract arguments boolean break byte
case catch char class* const
continue debugger default delete do
double else enum* eval export*
extends* false final finally float
for function goto if implements
import* in instanceof int interface
let long native new null
package private protected public return
short static super* switch synchronized
this throw throws transient true
try typeof var void volatile
while with yield    

浏览器关键字:

alert all anchor anchors area
assign blur button checkbox clearInterval
clearTimeout clientInformation close closed confirm
constructor crypto decodeURI decodeURIComponent defaultStatus
document element elements embed embeds
encodeURI encodeURIComponent escape event fileUpload
focus form forms frame innerHeight
innerWidth layer layers link location
mimeTypes navigate navigator frames frameRate
hidden history image images offscreenBuffering
open opener option outerHeight outerWidth
packages pageXOffset pageYOffset parent parseFloat
parseInt password pkcs11 plugin prompt
propertyIsEnum radio reset screenX screenY
scroll secure select self setInterval
setTimeout status submit taint text
textarea top unescape untaint window

JavaScript 对象、属性和方法

Array Date eval function hasOwnProperty
Infinity isFinite isNaN isPrototypeOf length
Math NaN name Number Object
prototype String toString undefined valueOf

表格来源:http://www.runoob.com/js/js-reserved.html

广告 广告

评论区