javascript window.close() 去掉那讨厌的确认对话框
<html>
<head>
<script type="text/javascript">
function goHome(){
var isIE = navigator.appName == "Microsoft Internet Explorer";
//alert(isIE);
if(isIE){
window.opener = "";
window.open("","_self");
window.close();
}
else{
/*FF 还要在 about:config 允许脚本脚本关闭窗口*/
window.close();
}
&nb
相关文档:
DHTML是""dynamic HTML"(动态HTML)的简称.严格地说,DHTML并不是一项单一的新技术,而是HTML,CSS和JavaScript这三种技术结合的产物.
DHTML背后的含义:
利用HTML把网页标记为各种元素;
&nbs ......
MochaUI
MochaUI is a web applications user interface library built on the Mootools JavaScript framework.
网址:http://mochaui.com/
演示:http://mochaui.com/demo/
授权方式:MIT License
jquery UI
网址:http://ui.jquery.com/
演示:http://ui.jquery.com/demos
授权方式:MIT and GPL lic ......
1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键
<table border oncontextmenu=return(false)><td>no</table> 可用于Table
2. <body onselectstart="return false"> 取消选取、防止复制
3. onpaste="return false" 不准粘贴
4. oncopy="return false;" oncut="re ......
写一个小系统时,需要动态添加表单元素,按自己的实现方法写了这篇教程!
我想各位在很多网站上都看到过类似的效果!
1、先用document.createElement方法创建一个input元素!
程序代码
var newInput = document.createElement("input");
2、设定相关属性,如name,type等
程序代码
newInput.type=mytype;
newInput.name ......
JS的正则表达式
//校验是否全由数字组成
function isDigit(s)
{
var patrn=/^[0-9]{1,20}$/;
if (!patrn.exec(s)) return false
return true
}
//校验登录名:只能输入5-20个以字母开头、可带数字、“_”、“.”的字串
Java代码
function isRegisterUserName(s) &n ......