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
相关文档:
前几天做网站的时候需要讲数据库中的时间读取到变量中进行使用,用到parseInt函数,讲字符转化为数字。今天测的时候发现问题了,当数据库中月份为09的时候就出问题了,用parseInt转换之后就成0了。好不解。测了好久,没有发现我代码中的问题,到google搜了一下,才知道是这么一回事。
对于parseInt("01")到parseInt( ......
1.substring 方法
定义和用法
substring 方法用于提取字符串中介于两个指定下标之间的字符。
语法
stringObject.substring(start,stop)
参数 描述
start 必需。一个非负的整数,规定要提取的子串的第一个字符在 stringObject 中的位置。
stop 可选。一个非负的整数,比要提取的子串的最后一个字符 ......
写一个小系统时,需要动态添加表单元素,按自己的实现方法写了这篇教程!
我想各位在很多网站上都看到过类似的效果!
1、先用document.createElement方法创建一个input元素!
程序代码
var newInput = document.createElement("input");
2、设定相关属性,如name,type等
程序代码
newInput.type=mytype;
newInput.name ......
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 ......