ArthurXF从业10年的CTO,受上海非凡学院邀请,进行PHP,CSS,FREEBSD等网络技能授课培训,有意向参加的,请联系.
1.document.formName.item("itemName") 问题
说明:IE下,可以使用document.formName.item("itemName")或document.formName.elements["elementName"];Firefox下,只能使用document.formName.elements["elementName"].
解决方法:统一使用document.formName.elements["elementName"].

2.集合类对象问题
说明:IE下,可以使用()或[]获取集合类对象;Firefox下,只能使用[]获取集合类对象.
解决方法:统一使用[]获取集合类对象.

3.自定义属性问题
说明:IE下,可以使用获取常规属性的方法来获取自定义属性,也可以使用getAttribute()获取自定义属性;Firefox下,只能使用getAttribute()获取自定义属性.
解决方法:统一通过getAttribute()获取自定义属性.

4.eval("idName")问题
说明:IE下,,可以使用eval("idName")或getElementById("idName")来取得id为idName的HTML对象;Firefox下只能使用getElementById("idName")来取得id为idName的HTML对象.
解决方法:统一用getElementById("idName")来取得id为idName的HTML对象.

5.变量名与某HTML对象ID相同的问题
说明:IE下,HTML对象的ID可以作为document的下属对象变量名直接使用;Firefox下则不能.Firefox下,可以使用与HTML对象ID相同的变量名;IE下则不能。
解决方法:使用document.getElementById("idName")代替document.idName.最好不要取HTML对象ID相同的变量名,以减少错误;在声明变量时,一律加上var,以避免歧义.

7.input.type属性问题
说明:IE下input.type属性为只读;但是Firefox下input.type属性为读写.

9.event.x与event.y问题
说明:IE下,even对象有x,y属性,但是没有pageX,pageY属性;Firefox下,even对象有pageX,pageY属性,但是没有x,y属性.
解决方法:使用mX(mX = event.x ? event.x : event.pageX;)来代替IE下的event.x或者Firefox下的event.pageX.

10.event.srcElement问题
说明:IE下,event对象有srcElement属性,但是没有target属性;Firefox下,event对象有target属性,但是没有srcElement属性.
解决方法:使用obj(obj = event.srcElement ? event.srcElement : event.target;)来代替IE下的event.srcElement或者Firefox下的event.target.

13.frame问题
以下面的frame为例:


(1)访问frame对象:
IE:使用window.frameId或者window.frameName来访问这个frame对象.
Firefox:只能使用window.frameName来访问这个frame对象.
另外,在IE和Firefox中都可以使用window.document.getElementById("frameId")来访问这个frame对象.

(2)切换frame内容:
在IE和Firefox中都可以使用window.document.getElementById("testFrame").src = "xxx.html"或window.frameName.location = "xxx.html"来切换frame的内容.

如果需要将frame中的参数传回父窗口,可以在frme中使用parent来访问父窗口。例如:parent.document.form1.filename.value="Aqing";

14.body问题
Firefox的body在body标签没有被浏览器完全读入之前就存在;而IE的body则必须在body标签被浏览器完全读入之后才存在.

例如:
Firefox:



IE&Firefox:




15. 事件委托方法
IE:document.body.onload = inject; //Function inject()在这之前已被实现

Firefox:document.body.onload = inject();

有人说标准是:
document.body.onload=new Function('inject()');

16. firefox与IE(parentElement)的父元素的区别
IE:obj.parentElement
firefox:obj.parentNode

解决方法: 因为firefox与IE都支持DOM,因此使用obj.parentNode是不错选择.

17.innerText在IE中能正常工作,但是innerText在FireFox中却不行.
解决方法:
if(navigator.appName.indexOf("Explorer") > -1){

   document.getElementById('element').innerText = "my text";

} else{

   document.getElementById('element').textContent = "my text";

}

18. FireFox中类似 obj.style.height = imgObj.height 的语句无效
解决方法:
obj.style.height = imgObj.height + 'px';

19. ie,firefox以及其它浏览器对于 table 标签的操作都各不相同,在ie中不允许对table和tr的innerHTML赋值,使用js增加一个tr时,使用appendChile方法也不管用。
解决方法:
//向table追加一个空行:
var row = otable.insertRow(-1);
var cell = document.createElement("td");
cell.innerHTML = " ";
cell.className = "XXXX";
row.appendChild(cell);

20. padding 问题
padding 5px 4px 3px 1px FireFox无法解释简写,

必须改成 padding-top:5px; padding-right:4px; padding-bottom:3px; padding-left:1px;

21. 消除ul、ol等列表的缩进时
样式应写成:list-style:none;margin:0px;padding:0px;

其中margin属性对IE有效,padding属性对FireFox有效

22. CSS透明
IE:filter:progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=60)。

FF:opacity:0.6。

23. CSS圆角
IE:不支持圆角。

FF: -moz-border-radius:4px,或者-moz-border-radius-topleft:4px;-moz-border- radius-topright:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius- bottomright:4px;。

24. CSS双线凹凸边框
IE:border:2px outset;。

FF: -moz-border-top-colors: #d4d0c8 white;-moz-border-left-colors: #d4d0c8 white;-moz-border-right-colors:#404040 #808080;-moz-border-bottom-colors:#404040 #808080;

25.ie支持document.all 而firefox 不支持
改用下面三个tag的其中一个来代替document.all
getElementsByTagName("tagName") 可以得到得到所有标签元素的集合
getElementById("idName")          可以按id得到某一元素
getElementsByName("Name")            可以得到按name属性得到某一元素

26、firefox 中使用innerHTML 的方法

document.all.online.innerHTML; //这种方法在IE中可以使用,但不是标准方法
document.getElementById("online").innerHTML; //这样firefox就能使用innerHTML了

27、eval()与window.execScript()执行脚本
IE、firerox均支持eval(),firefox不支持window.execScript()

解决:统一使用eval()

28、对事件处理函数的重写
解决:(例):如对document的onclick()重写,统一使用document.onclick = function(){…}
Tags: , ,
1.1 Form对象

现有问题:
现有代码这获得form对象通过document.forms("formName"),这样使用在IE 能接受,FF 不能。

解决方法:
改用 作为下标运算。改为document.forms["formName"]

备注
上述的改用 作为下标运算中的formName是id而name


1.2 HTML对象

现有问题:
在 IE 中,HTML 对象的 ID 可以作为 document 的下属对象变量名直接使用。在 FF 中不能。
document.all("itemName")或者document.all("itemId")

解决方法:
使用对象ID作为对象变量名
document.getElementById("itemId")

备注
document.all是IE自定义的方法,所以请大家尽量不使用。
还有一种方式,在IE和FF都可以使用
var f = document.forms["formName "];
var o = f. itemId;


1.3 DIV对象

现有问题:
在 IE 中,DIV对象可以使用ID作为对象变量名直接使用。在 FF 中不能。
DivId.style.display = "none"

解决方法:
document.getElementById("DivId").style.display = "none"

备注
获得对象的方法不管是不是DIV对象,都使用getElementById方法。参见1.2


1.4 关于frame

现有问题
在 IE中 可以用window.testFrame取得该frame,FF中不行

解决方法
在frame的使用方面FF和IE的最主要的区别是:
如果在frame标签中书写了以下属性:

那么IE可以通过id或者name访问这个frame对应的window对象
而FF只可以通过name来访问这个frame对应的window对象
例如如果上述frame标签写在最上层的window里面的htm里面,那么可以这样访问
IE: window.top.frameId或者window.top.frameName来访问这个window对象
FF:只能这样window.top.frameName来访问这个window对象
另外,在FF和ie中都可以使用window.top.document.getElementById("frameId")来访问frame标签
并且可以通过window.top.document.getElementById("testFrame").src = 'xx.htm'来切换frame的内容
也都可以通过window.top.frameName.location = 'xx.htm'来切换frame的内容


1.5 窗口

现有问题
IE中可以通过showModalDialog和showModelessDialog打开模态和非模态窗口,但是FF不支持。

解决办法
直接使用window.open(pageURL,name,parameters)方式打开新窗口。
如果需要传递参数,可以使用frame或者iframe。


2.1 在JS中定义各种对象变量名时,尽量使用id,避免使用name。
在 IE 中,HTML 对象的 ID 可以作为 document 的下属对象变量名直接使用。在 FF 中不能,所以在平常使用时请尽量使用id,避免只使用name,而不使用id。


2.2 变量名与某 HTML 对象 id 相同的问题

现有问题
在 FF 中,因为对象 id 不作为 HTML 对象的名称,所以可以使用与 HTML 对象 id 相同的变量名,IE 中不能。  

解决方法
在声明变量时,一律加上 var ,以避免歧义,这样在 IE 中亦可正常运行。
此外,最好不要取与 HTML 对象 id 相同的变量名,以减少错误。  
Tags: , ,
  • 事件源对象
    event.srcElement.tagName
    event.srcElement.type
  • 捕获释放
    event.srcElement.setCapture();  
    event.srcElement.releaseCapture();  
  • 事件按键
    event.keyCode
    event.shiftKey
    event.altKey
    event.ctrlKey
  • 事件返回值
    event.returnValue
  • 鼠标位置
    event.x
    event.y
  • 窗体活动元素
    document.activeElement
  • 绑定事件
    document.captureEvents(Event.KEYDOWN);
  • 访问窗体元素
    document.all("txt").focus();
    document.all("txt").select();
  • 窗体命令
    document.execCommand
  • 窗体COOKIE
    document.cookie
  • 菜单事件
    document.oncontextmenu
  • 创建元素
    document.createElement("SPAN");  
  • 根据鼠标获得元素:
    document.elementFromPoint(event.x,event.y).tagName=="TD
    document.elementFromPoint(event.x,event.y).appendChild(ms)  
  • 窗体图片
    document.images[索引]
  • 窗体事件绑定
    document.onmousedown=scrollwindow;
  • 元素
    document.窗体.elements[索引]
  • 对象绑定事件
    document.all.xxx.detachEvent('onclick',a);
  • 插件数目
    navigator.plugins
  • 取变量类型
    typeof($js_libpath) == "undefined"
  • 下拉框
    下拉框.options[索引]
    下拉框.options.length
  • 查找对象
    document.getElementsByName("r1");
    document.getElementById(id);
  • 定时
    timer=setInterval('scrollwindow()',delay);
    clearInterval(timer);
  • UNCODE编码
    escape() ,unescape
  • 父对象
    obj.parentElement(dhtml)
    obj.parentNode(dom)
  • 交换表的行
    TableID.moveRow(2,1)
  • 替换CSS
    document.all.csss.href = "a.css";
  • 并排显示
    display:inline
  • 隐藏焦点
    hidefocus=true
  • 根据宽度换行
    style="word-break:break-all"
  • 自动刷新
    <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net">
  • 简单邮件
    <a  href="
    mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">  
  • 快速转到位置
    obj.scrollIntoView(true)

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  
  • 自动刷新
    <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net">
  • 简单邮件
    <a  href="
    mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">  
  • 快速转到位置
    obj.scrollIntoView(true)

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  
  • 隐藏焦点
    hidefocus=true
  • 根据宽度换行
    style="word-break:break-all"
  • 自动刷新
    <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net">
  • 简单邮件
    <a  href="
    mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">  
  • 快速转到位置
    obj.scrollIntoView(true)

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  
  • 自动刷新
    <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net">
  • 简单邮件
    <a  href="
    mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">  
  • 快速转到位置
    obj.scrollIntoView(true)

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  
  • 并排显示
    display:inline
  • 隐藏焦点
    hidefocus=true
  • 根据宽度换行
    style="word-break:break-all"
  • 自动刷新
    <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net">
  • 简单邮件
    <a  href="
    mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">  
  • 快速转到位置
    obj.scrollIntoView(true)

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  
  • 自动刷新
    <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net">
  • 简单邮件
    <a  href="
    mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">  
  • 快速转到位置
    obj.scrollIntoView(true)

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  
  • 隐藏焦点
    hidefocus=true
  • 根据宽度换行
    style="word-break:break-all"
  • 自动刷新
    <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net">
  • 简单邮件
    <a  href="
    mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">  
  • 快速转到位置
    obj.scrollIntoView(true)

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  
  • 自动刷新
    <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net">
  • 简单邮件
    <a  href="
    mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">  
  • 快速转到位置
    obj.scrollIntoView(true)

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  
  • 替换CSS
    document.all.csss.href = "a.css";
  • 并排显示
    display:inline
  • 隐藏焦点
    hidefocus=true
  • 根据宽度换行
    style="word-break:break-all"
  • 自动刷新
    <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net">
  • 简单邮件
    <a  href="
    mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">  
  • 快速转到位置
    obj.scrollIntoView(true)

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  
  • 自动刷新
    <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net">
  • 简单邮件
    <a  href="
    mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">  
  • 快速转到位置
    obj.scrollIntoView(true)

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  
  • 隐藏焦点
    hidefocus=true
  • 根据宽度换行
    style="word-break:break-all"
  • 自动刷新
    <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net">
  • 简单邮件
    <a  href="
    mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">  
  • 快速转到位置
    obj.scrollIntoView(true)

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  
  • 自动刷新
    <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net">
  • 简单邮件
    <a  href="
    mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">  
  • 快速转到位置
    obj.scrollIntoView(true)

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  
  • 并排显示
    display:inline
  • 隐藏焦点
    hidefocus=true
  • 根据宽度换行
    style="word-break:break-all"
  • 自动刷新
    <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net">
  • 简单邮件
    <a  href="
    mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">  
  • 快速转到位置
    obj.scrollIntoView(true)

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  
  • 自动刷新
    <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net">
  • 简单邮件
    <a  href="
    mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">  
  • 快速转到位置
    obj.scrollIntoView(true)

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  
  • 隐藏焦点
    hidefocus=true
  • 根据宽度换行
    style="word-break:break-all"
  • 自动刷新
    <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net">
  • 简单邮件
    <a  href="
    mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">  
  • 快速转到位置
    obj.scrollIntoView(true)

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  
  • 自动刷新
    <meta HTTP-EQUIV="refresh" CONTENT="8;URL=http://c98.yeah.net">
  • 简单邮件
    <a  href="
    mailto:aaa@bbb.com?subject=ccc&body=xxxyyy">  
  • 快速转到位置
    obj.scrollIntoView(true)

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  

  • <a name="first">
    <a href="http://www.bizeway.net/admin.php#first">anchors</a>
  • 网页传递参数
    location.search();
  • 可编辑
    obj.contenteditable=true
  • 执行菜单命令
    obj.execCommand
  • 双字节字符
    /[^\x00-\xff]/
    汉字
    /[\u4e00-\u9fa5]/
  • 让英文字符串超出表格宽度自动换行
    word-wrap: break-word; word-break: break-all;
  • 透明背景
    <IFRAME src="1.htm" width=300 height=180 allowtransparency></iframe>
  • 获得style内容
    obj.style.cssText
  • HTML标签
    document.documentElement.innerHTML
  • 第一个style标签
    document.styleSheets[0]
  • style标签里的第一个样式
    document.styleSheets[0].rules[0]
  • 防止点击空链接时,页面往往重置到页首端。
    <a href="javascript:function()">word</a>
  • 上一网页源
    asp:
    request.servervariables("HTTP_REFERER")
    javascript:
    document.referrer
  • 释放内存
    CollectGarbage();
  • 禁止右键
    document.oncontextmenu = function() { return false;}
  • 禁止保存
    <noscript><iframe src="*.htm"></iframe></noscript>
  • 禁止选取<body oncontextmenu="return false" ondragstart="return false" onselectstart ="return false" onselect="document.selection.empty()" oncopy="document.selection.empty()" onbeforecopy="return false"onmouseup="document.selection.empty()>
  • 禁止粘贴
    <input type=text onpaste="return false">
  • 地址栏图标
    <link rel="Shortcut Icon" href="favicon.ico">
    favicon.ico 名字最好不变16*16的16色,放虚拟目录根目录下
  • 收藏栏图标
    <link rel="Bookmark" href="favicon.ico">
  • 查看源码
    <input type=button value=查看网页源代码 onclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">
  • 关闭输入法
    <input style="ime-mode:disabled">
  • 自动全选
    <input type=text name=text1 value="123" onfocus="this.select()">
  • ENTER键可以让光标移到下一个输入框
    <input onkeydown="if(event.keyCode==13)event.keyCode=9">
  • 文本框的默认值
    <input type=text value="123" onfocus="alert(this.defaultValue)">
  • title换行
    obj.title = "123 sdfs "
  • 获得时间所代表的微秒
    var n1 = new Date("2004-10-10".replace(/-/g, "\/")).getTime()
  • 窗口是否关闭
    win.closed
  • checkbox扁平
    <input type=checkbox style="position: absolute; clip:rect(5px 15px 15px 5px)"><br>
  • 获取选中内容
    document.selection.createRange().duplicate().text
  • 自动完成功能
    <input  type=text  autocomplete=on>打开该功能  
    <input  type=text  autocomplete=off>关闭该功能    
  • 窗口最大化
    <body onload="window.resizeTo(window.screen.width - 4,window.screen.height-50);window.moveTo(-4,-4)">
  • 无关闭按钮IE
    window.open("aa.htm", "meizz", "fullscreen=7");
  • 统一编码/解码
    alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
    encodeURIComponent对":"、"/"、";" 和 "?"也编码
  • 表格行指示
    <tr onmouseover="this.bgColor='#f0f0f0'" onmouseout="this.bgColor='#ffffff'">


    //各种尺寸

    s  +=  "\r\n网页可见区域宽:"+  document.body.clientWidth;  
    s  +=  "\r\n网页可见区域高:"+  document.body.clientHeight;  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetWeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页可见区域高:"+  document.body.offsetHeight  +"  (包括边线的宽)";  
    s  +=  "\r\n网页正文全文宽:"+  document.body.scrollWidth;  
    s  +=  "\r\n网页正文全文高:"+  document.body.scrollHeight;  
    s  +=  "\r\n网页被卷去的高:"+  document.body.scrollTop;  
    s  +=  "\r\n网页被卷去的左:"+  document.body.scrollLeft;  
    s  +=  "\r\n网页正文部分上:"+  window.screenTop;  
    s  +=  "\r\n网页正文部分左:"+  window.screenLeft;  
    s  +=  "\r\n屏幕分辨率的高:"+  window.screen.height;  
    s  +=  "\r\n屏幕分辨率的宽:"+  window.screen.width;  
    s  +=  "\r\n屏幕可用工作区高度:"+  window.screen.availHeight;  
    s  +=  "\r\n屏幕可用工作区宽度:"+  window.screen.availWidth;  
  • //过滤数字

    <input type=text onkeypress="return event.keyCode>=48&&event.keyCode<=57||(this.value.indexOf('.')<0?event.keyCode==46:false)" onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false">

    <input type=text onkeypress="return event.keyCode>=48&&event.keyCode<=57||(this.value.indexOf('.')<0?event.keyCode==46:false)" onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false">

    //特殊用途

    <input type=button value=导入收藏夹 onclick="window.external.ImportExportFavorites(true,'http://localhost');">
    <input type=button value=导出收藏夹 onclick="window.external.ImportExportFavorites(false,'http://localhost');">
    <input type=button value=整理收藏夹 onclick="window.external.ShowBrowserUI('OrganizeFavorites', null)">
    <input type=button value=语言设置   onclick="window.external.ShowBrowserUI('LanguageDialog', null)">
    <input type=button value=加入收藏夹 onclick="window.external.AddFavorite('http://www.google.com/', 'google')">
    <input type=button value=加入到频道 onclick="window.external.addChannel('http://www.google.com/')">
    <input type=button value=加入到频道 onclick="window.external.showBrowserUI('PrivacySettings',null)">

    <input type=button value=导入收藏夹 onclick="window.external.ImportExportFavorites(true,'http://localhost');">
    <input type=button value=导出收藏夹 onclick="window.external.ImportExportFavorites(false,'http://localhost');">
    <input type=button value=整理收藏夹 onclick="window.external.ShowBrowserUI('OrganizeFavorites', null)">
    <input type=button value=语言设置   onclick="window.external.ShowBrowserUI('LanguageDialog', null)">
    <input type=button value=加入收藏夹 onclick="window.external.AddFavorite('http://www.google.com/', 'google')">
    <input type=button value=加入到频道 onclick="window.external.addChannel('http://www.google.com/')">
    <input type=button value=加入到频道 onclick="window.external.showBrowserUI('PrivacySettings',null)">

    //不缓存

    <META HTTP-EQUIV="pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
    <META HTTP-EQUIV="expires" CONTENT="0">


    //正则匹配

    匹配中文字符的正则表达式: [\u4e00-\u9fa5]
    匹配双字节字符(包括汉字在内):[^\x00-\xff]
    匹配空行的正则表达式:\n[\s| ]*\r
    匹配HTML标记的正则表达式:/<(.*)>.*<\/\1>|<(.*) \/>/  
    匹配首尾空格的正则表达式:(^\s*)|(\s*$)(像vbscript那样的trim函数)
    匹配Email地址的正则表达式:\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
    匹配网址URL的正则表达式:http://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?
    以下是例子:
    利用正则表达式限制网页表单里的文本框输入内容:
    用正则表达式限制只能输入中文:onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"
    1.用正则表达式限制只能输入全角字符: onkeyup="value=value.replace(/[^\uFF00-\uFFFF]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\uFF00-\uFFFF]/g,''))"
    2.用正则表达式限制只能输入数字:onkeyup="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
    3.用正则表达式限制只能输入数字和英文:onkeyup="value=value.replace(/[\W]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"

  • Tags:
    getElementById getElementsByName getElementsByTagName 大概介绍

      getElementById ,getElementsByName ,getElementsByTagName

      后两个是得到集合,byid只是得到单个对象

      getElementById 的用法

      举个例子:

      <a id="link1" name="link1" href=http://www.kungfuman.net>功夫之王</a>

      同一页面内的引用方法:

      1、使用id:

      link1.href,返回值为http://www.kungfuman.net

      2、使用name:

      document.all.link1.href,返回值为http://www.kungfuman.net

      3、使用sourseIndex:

      document.all(4).href //注意,前面还有Html、HEAD、TITLE和BODY,所以是4

      4、使用链接集合:

      document.anchors(0).href

      //全部的集合有all、anchors、applets、areas、attributes、behaviorUrns、bookmarks、boundElements、cells、childNodes、children、controlRange、elements、embeds、filters、forms、frames、images、imports、links、mimeTypes、options、plugins、rows、rules、scripts、styleSheets、tBodies、TextRectangle,请参考MSDN介绍。

      其实方法3和方法4是一样使用的集合,只是一个是all,可以包括页面所有标记,而anchors只包括链接。

      5、getElementById:

      document.getElementById("link1").href

      6、getElementsByName:

      document.getElementsByName("link1")[0].href //这也是一个集合,是所有name等于该方法所带参数的标记的集合

      7、getElementsByTagName:

      document.getElementsByTagName("A")[0].href //这也是一个集合,是所有标记名称等于该方法所带参数的标记的集合

      8、tags集合:

      document.all.tags("A")[0].href

      //与方法7一样是按标记名称取得一个集合

      除此之外:

      event.scrElement可以获得触发时间的标记的引用;

      document.elementFromPoint(x,y)可以获得x和y坐标处的元素的引用;

      document.body.componentFromPoint(event.clientX,event.clientY)可以获得鼠标所在处元素的引用;

      还可以通过元素的父子节点和兄弟节点关系来引用,如nextSibling(当前节点的后一节点)、previousSibling(当前节点的前一节点)、childNodes、children、firstChild、lastChild、parentElement等都是父子节点和兄弟节点的一些引用;还不仅限于此。

      上面是同一页面内的常见引用方法,另外还涉及到不同页面中的

      getElementsByName返回的是所有name为指定值的所有元素的集合

      “根据 NAME 标签属性的值获取对象的集合。”

      集合比数组要松散的多, 集合里每个子项的类型可以不同, 集合只是把某些元素放在一起作为一类来使用, 相比之下数组就严格多了, 每个子项都是统一的类型. document.getElementsByName, document.getElementsByTagName, document.formName.elements 这类方法所得到的结果都是集合.

      例:

    <html>

  • <head>

    <title>fish</title>

    function get(){

    var xx=document.getElementById("bbs")

    alert("标记名称:"+xx.tagName);

    }

    function getElementName(){

    var ele = document.getElementsByName("happy");

    alert("无素为happy的个数:" + ele.length);

    }

    <body>

    <h2 id="bbs">获取文件指定的元素</h2>

    <hr>

    <form>

    <input type="button" onclick="get()" value="获取标题标记">

    <input type="button" name="happy" onclick="getElementName()" value="click "><input type="button" name="happy" onclick="getElementName()" value="click "><input type="button" name="happy" onclick="getElementName()" value="click "><input type="button" name="happy" onclick="getElementName()" value="click "><input type="button" name="happy" onclick="getElementName()" value="click ">

    </form>

    </body>

    </html>

      document.getElementsByName()这个方法.它对一个和多个的处理是一样的,我们可以用:

      Temp = document.getElementsByName('happy')来引用

      当Temp只有1个的时候,那么就是Temp[0],有多个的时候,用下标法Temp[i]循环获取

      也有例外:

      在ie 中getElementsByName(“test“)的时候返回的是id=test的object数组,而Firefox则返回的是name= test的object的数组。

      按照w3c的规范应该是返回的是name= test的object的数组。

      firefox和ie中的getElementByID相同:获取对 ID 标签属性为指定值的第一个对象的引用。

      注意getElementsByName 有s在里面

      document.getElementById()可以控制某个id的tag

      document.getElementsByName(),返回的是一个具有相同 name 属性的元素的集合,而不是某个,注意有“s”。

      而 document.getElementsByTagName() 返回的是一组相同 TAG 的元素集合。

     同一个name可以有多个element,所以用document.getElementsByName("theName")

      他return 一个collection,引用的时候要指名index

      var test = document.getElementsByName('testButton')[0];

      id那个,是唯一的

      还应该注意:对类似没有name属性,对它name属性为伪属性document.getElementsByName() 会失效,当然TD可以设置ID属性,然后用 document.getElementsByID("DDE_NODAY"); 调用.

  • Tags:

    javascript事件大全

    2007/06/04 01:08 ArthurXF
    click() 对象.click() 使对象被点击。
    closed 对象.closed 对象窗口是否已关闭true/false
    clearTimeout(对象) 清除已设置的setTimeout对象
    clearInterval(对象) 清除已设置的setInterval对象
    confirm("提示信息") 弹出确认框,确定返回true取消返回false
    cursor:样式 更改鼠标样式 hand crosshair text wait help default auto e/s/w/n-resize

    event.clientX 返回最后一次点击鼠标X坐标值;
    event.clientY 返回最后一次点击鼠标Y坐标值;
    event.offsetX 返回当前鼠标悬停X坐标值
    event.offsetY 返回当前鼠标悬停Y坐标值

    document.write(document.lastModified) 网页最后一次更新时间
    document.ondblclick=x 当双击鼠标产生事件
    document.onmousedown=x 单击鼠标键产生事件

    document.body.scrollTop; 返回和设置当前竖向滚动条的坐标值,须与函数配合,
    document.body.scrollLeft; 返回和设置当前横向滚动务的坐标值,须与函数配合,
    document.title document.title="message"; 当前窗口的标题栏文字
    document.bgcolor document.bgcolor="颜色值"; 改变窗口背景颜色
    document.Fgcolor document.Fgcolor="颜色值"; 改变正文颜色
    document.linkcolor document.linkcolor="颜色值"; 改变超联接颜色
    document.alinkcolor document.alinkcolor="颜色值"; 改变正点击联接的颜色
    document.VlinkColor document.VlinkColor="颜色值"; 改变已访问联接的颜色
    document.forms.length 返回当前页form表单数
    document.anchors.length 返回当前页锚的数量
    document.links.length 返回当前页联接的数量
    document.onmousedown=x 单击鼠标触发事件
    document.ondblclick=x 双击鼠标触发事件
    defaultStatus window.status=defaultStatus; 将状态栏设置默认显示

    function function xx(){...} 定义函数
    isNumeric 判断是否是数字
    innerHTML xx=对象.innerHTML 输入某对象标签中的html源代码
    innerText divid.innerText=xx 将以div定位以id命名的对象值设为XX

    location.reload(); 使本页刷新,target可等于一个刷新的网页

    Math.random() 随机涵数,只能是0到1之间的数,如果要得到其它数,可以为*10,再取整
    Math.floor(number) 将对象number转为整数,舍取所有小数
    Math.min(1,2) 返回1,2哪个小
    Math.max(1,2) 返回1,2哪个大

    navigator.appName 返回当前浏览器名称
    navigator.appVersion 返回当前浏览器版本号
    navigator.appCodeName 返回当前浏览器代码名字
    navigator.userAgent 返回当前浏览器用户代标志

    onsubmit onsubmit="return(xx())" 使用函数返回值
    opener opener.document.对象 控制原打开窗体对象

    prompt xx=window.prompt("提示信息","预定值"); 输入语句
    parent parent.框架名.对象 控制框架页面

    return return false 返回值
    random 随机参数(0至1之间)
    reset() form.reset(); 使form表单内的数据重置

    split("") string.split("") 将string对象字符以逗号隔开
    submit() form对象.submit() 使form对象提交数据

    String对象的 charAt(x)对象 反回指定对象的第多少位的字母
    lastIndexOf("string") 从右到左询找指定字符,没有返回-1
    indexOf("string") 从左到右询找指定字符,没有返回-1
    LowerCase() 将对象全部转为小写
    UpperCase() 将对象全部转为大写
    substring(0,5) string.substring(x,x) 返回对象中从0到5的字符
    setTimeout("function",time) 设置一个超时对象
    setInterval("function",time) 设置一个超时对象

    toLocaleString() x.toLocaleString() 从x时间对象中获取时间,以字符串型式存在
    typeof(变量名) 检查变量的类型,值有:String,Boolean,Object,Function,Underfined

    window.event.button==1/2/3 鼠标键左键等于1右键等于2两个键一起按为3
    window.screen.availWidth 返回当前屏幕宽度(空白空间)
    window.screen.availHeight 返回当前屏幕高度(空白空间)
    window.screen.width 返回当前屏幕宽度(分辨率值)
    window.screen.height 返回当前屏幕高度(分辨率值)
    window.document.body.offsetHeight; 返回当前网页高度
    window.document.body.offsetWidth; 返回当前网页宽度
    window.resizeTo(0,0) 将窗口设置宽高
    window.moveTo(0,0) 将窗口移到某位置
    window.focus() 使当前窗口获得焦点
    window.scroll(x,y) 窗口滚动条坐标,y控制上下移动,须与函数配合
    window.open() window.open("地址","名称","属性")
    属性:toolbar(工具栏),location(地址栏),directions,status(状态栏),
    menubar(菜单栏),scrollbar(滚动条),resizable(改变大小), width(宽),height(高),fullscreen(全 屏),scrollbars(全屏时无滚动条无参 数,channelmode(宽屏),left(打开窗口x坐标),top(打开窗口y坐标)
    window.location = 'view-source:' + window.location.href 应用事件查看网页源代码;


    a=new Date(); //创建a为一个新的时期对象
    y=a.getYear(); //y的值为从对象a中获取年份值 两位数年份
    y1=a.getFullYear(); //获取全年份数 四位数年份
    m=a.getMonth(); //获取月份值
    d=a.getDate(); //获取日期值
    d1=a.getDay(); //获取当前星期值
    h=a.getHours(); //获取当前小时数
    m1=a.getMinutes(); //获取当前分钟数
    s=a.getSeconds(); //获取当前秒钟数


    对象.style.fontSize="文字大小";
    单位:mm/cm/in英寸/pc帕/pt点/px象素/em文字高
    1in=1.25cm
    1pc=12pt
    1pt=1.2px(800*600分辩率下)

    文本字体属性:
    fontSize大小
    family字体
    color颜色
    fontStyle风格,取值为normal一般,italic斜体,oblique斜体且加粗
    fontWeight加粗,取值为100到900不等,900最粗,light,normal,bold
    letterSpacing间距,更改文字间距离,取值为,1pt,10px,1cm
    textDecoration:文字修饰;取值,none不修饰,underline下划线,overline上划线
    background:文字背景颜色,
    backgroundImage:背景图片,取值为图片的插入路径


    点击网页正文函数调用触发器:

    1.onClick 当对象被点击
    2.onLoad 当网页打开,只能书写在body中
    3.onUnload 当网页关闭或离开时,只能书写在body中
    4.onmouseover 当鼠标悬于其上时
    5.onmouseout 当鼠标离开对象时
    6.onmouseup 当鼠标松开
    7.onmousedown 当鼠标按下键
    8.onFocus 当对象获取焦点时
    9.onSelect 当对象的文本被选中时
    10.onChange 当对象的内容被改变
    11.onBlur 当对象失去焦点
    onsubmit=return(ss())表单调用时返回的值

    直线 border-bottom:1x solid black
    虚线 border-bottom:1x dotted black
    点划线 border-bottom:2x dashed black
    双线 border-bottom:5x double black
    槽状 border-bottom:1x groove black
    脊状 border-bottom:1x ridge black


    1.边缘高光glow(color=颜色,strength=亮光大小)

    2.水平翻转fliph() 使对象水平翻转180度

    3.垂直翻转flipv() 使对象垂直翻转180度

    4.对象模糊blur(add=true/false direction=方向 strength=强度)
    add指定是否按印象画派进行模糊direction模糊方向strength模糊强度
    5.对象透明alpha(opaction=0-100,finishopacity=0-100,style=0/1/2/3)
    opaction对象整体不透明值finishopacity当对象利用了渐透明时该项指定结束透明位置的不透明值style指定透明方式0为整体透明,1为线型透明,2为圆型透明,3为矩形透明
    6.去除颜色chroma(color=颜色值)使对象中颜色与指定颜色相同区域透明
    7.建立阴影dropshadow(color=阴影颜色,offx=水平向左偏离像素,offy=水平向下偏离像素)
    8.去色gray()使对象呈灰度显示
    9.负片效果invert()使对象呈底片效果
    10.高光light()使对象呈黑色显示
    11.遮盖mask(color=颜色)使整个对象以指定颜色进行蒙板一次

    opacity 表透明度水平.0~100,0表全透明,100表完全不透明
    finishopacity表想要设置的渐变透明效果.0~100.
    style 表透明区的形状.0表统一形状.1表线形.2表放射形.3表长方形.
    startx.starty表渐变透明效果的开始时X和Y坐标.
    finishx,finishy渐变透明效果结束时x,y 的坐标.
    add有来确定是否在模糊效果中使有原有目标.值为0,1.0表"否",1表"是".
    direction设置模糊的方向.0度表垂直向上,45度为一个单位.默认值是向左270度.left,right,down,up.
    strength 只能用整数来确定.代表有多少个像素的宽度将受到模糊影响.默认是5个.
    color要透明的颜色.
    offx,offy分别是x,y 方向阴影的偏移量.
    positive指投影方式.0表透明像素生成阴影.1表只给出不透明像素生成阴影..

    AddAmbient:加入包围的光源.
    AddCone:加入锥形光源.
    AddPoint加入点光源
    Changcolor:改变光的颜色.
    Changstrength:改变光源的强度.
    Clear:清除所有的光源.
    MoveLight:移动光源.

    freq是波纹的频率,在指定在对象上一区需要产生多少个完事的波纹.
    lightstrength可对于波纹增强光影的效果.显著0~100正整数,正弦波开始位置是0~360度.0表从0度开始,25表从90度开始.
    strength表振幅大小.


    hand style="cursor:hand"
    crosshair style="cursor:crosshair"
    text style="cursor:text"
    wait style="cursor:wait"
    default style="cursor:default"
    help style="cursor:help"
    e-resize style="cursor:e-resize"
    ne-resize style="cursor:ne-resize"
    n-resize style="cursor:n-resize"
    nw-resize style="cursor:nw-resize"
    w-resize style="cursor:w-resize"
    s-resize style="cursor:s-resize"
    sw-resize style="cursor:sw-resize "
    se-resize style="cursor:se-resize"
    auto style="cursor:auto"

    现在ArthurXF本人正在搞PHP等技术培训,如果想学习的人可以跟我联系。另外培训的招生简章在这个网址,想了解的可以去看看。
    PHP培训招生简章
    Tags: ,
    分页: 3/3 第一页 上页 1 2 3 最后页 [ 显示模式: 摘要 | 列表 ]