易截截图软件、单文件、免安装、纯绿色、仅160KB

javascript小技巧

 IE7不经提示关闭浏览器窗口
<a href="javascript:window.open('','_top'); window.top.close();">Close IE7</a>
----------------------------
用window.open方法打开新窗口显示提示信息
有时候我们需要打开一个新窗口用来显示提示信息
这个自然会想到用window.open()方法
但新窗体的内容并不是固定的
如果我们建立一个 tip.html 的静态页面,专门用来让window.open打开,打开之后再用js设置窗体的内容
这样做也能满足要求,但是有没有更好的方法呢?
下面的方法可以不用建一个专门的静态页面,而是每次都是打开一个临时窗口,窗体的内容也是动态构造的
请看代码:
<input type=button value=open onclick="openWindow=window.open();
    openWindow.document.writeln('<html>');
    openWindow.document.writeln('<TITLE>Open Test</TITLE>');
    openWindow.document.writeln('<BODY>');
    openWindow.document.writeln('<center>');
    openWindow.document.writeln('Hello! New window opened!'); 
    openWindow.document.writeln('<br><br>');
    openWindow.document.writeln('<input type=button value=close onclick=window.close()>'); 
    openWindow.document.writeln('</center>');
    openWindow.document.writeln('</BODY>'); 
    openWindow.document.writeln('</HTML>'); 
    openWindow.document.close(); " >
==========================================
网页屏蔽鼠标右键和左键选中功能
document.oncontextmenu = new Function("event.returnValue=false;");
document.onselectstart = new Function("event.returnValue=false;");
=======================================================
用JavaScript获取客户端MAC地址(转)
 
<HTML><HEAD><TITLE>WMI Scripting HTML</TITLE>
<META http-equiv=Content-Type conte


相关文档:

JavaScript checkbox全选与全不选的切换

  function select_all(){
var paras = document.getElementsByTagName("input");//全选checkbox
if(document.getElementById("all").checked==true){
for(var i=0; i<paras.length; i++){
var name = paras[i].getAttribute("name") //单选checkbox的name均d ......

javascript中的字符串嵌套

 在JavaScript中字符串是用引号“" "”、“' '”包起来的零个至多个字符。用哪个引号开始就用哪个结束,而且单双引号可嵌套使用,不过JavaScript 中引号的嵌套只能有一层。如果想再多嵌一些,需要用转义字符:
转义字符 由于一些字符在屏幕上不能显示,或者 JavaScript 语法上已经有了特殊用途, ......

张孝祥JavaScript视频教程

本文来自:http://forum.sysmu.com/thread-394-1-1.html
 网通线路,部分文件下载比较慢,望谅解! 7 P+ q$ K. }0 ^$ l1 b
第一部分: html语言基础
ftp://edu:edu@ftp.hyperedu.cn:2003/视频教学1区/JavaScript张孝祥/01-01.rmvb 
fftp://edu:edu@ftp.hyperedu.cn:2003/视频教学1区/JavaScript张孝祥/01-02.rm ......

操作ClassName的工具函数(JavaScript权威指南)

/**
* CSSClass.js
*/
var CSSClass = {}; //Create our namespace object
//Return tru if element e is a member of the class c;false otherwise
CSSClass.is = fucntion(e, c)
{
if(typeof e == "string")
e = document.getElementById(e);
//Before doing a regexp search,optimize for couple of co ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号