![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
js
文章平均质量分 62
12小白
这个作者很懒,什么都没留下…
展开
-
js 中局部变量和全局变量输出遇到的问题
代码如下: var i = "javascript"test();function test(){var j = "livescript"k = "vbscript"document.writeln("out:"+i+"");document.writeln("in:"+j+"");document.writeln("out:"+k+"");}原创 2013-12-17 22:04:01 · 1452 阅读 · 1 评论 -
js入门例子小结3
感谢张龙的视频js17.html//采用confirm if(confirm("你确定继续?")){window.location.href="http://www.google.com";}else {alert("bye");}js19.htmlvar v = document.getElementById("button1"原创 2014-01-17 21:57:48 · 701 阅读 · 0 评论 -
js入门例子小结一
感谢张龙的视频js2.htmlwith (document)//with 语句通常用来缩短特定情形下必须写的代码量{write("");write("hello");write("world");write("welcome xiaobai");write("");}js3.html//for...in 遍历对象的属性值function member(name原创 2014-01-17 21:15:44 · 725 阅读 · 0 评论 -
js入门例子小结2
感谢张龙的视频js12.html//鼠标移来移去触发不同的事件//this 代表当前对象的引用即font对象function mOver(object){object.color = "red";}function mOut(object){object.color = "yellow";} <font style="cursor:原创 2014-01-17 21:52:32 · 675 阅读 · 0 评论 -
js入门例子小结4
感谢张龙老师js23.html//遍历所有的链接function cl(){alert(document.links.length);for(var i = 0 ; i < document.links.length; i++){alert(document.links[i]);}} 搜索引擎列表:googlebaidusougubing原创 2014-01-17 22:02:22 · 750 阅读 · 0 评论