随笔分类 -  030、java Script

摘要:解决方案(伪代码):(http://www.cnblogs.com/see7di/archive/2011/09/08/2239653.html)jQuery( “*”, obj).add([obj]).each(function(){jQuery.event.remove(this);jQuery 阅读全文
posted @ 2017-03-15 16:39 汉城 阅读(1585) 评论(0) 推荐(0)
摘要:String.prototype.trim=function(){ return this.replace(/(^\s*)|(\s*$)/g, "");} 阅读全文
posted @ 2016-02-09 09:20 汉城 阅读(150) 评论(0) 推荐(0)
摘要:function CheckDateFormat(_value) { //var a = /^(\d{4})-(\d{2})-(\d{2})$/; // var a = /^(\d{4})(-|\/)(\d{2})(-|\/)(\d{2})$/; var a = /^(\d{4})(\/)(\d{2})(\/)(\d{2})$/; if (!a.test(_value)) { // alert("日期格式不正确!") alert("... 阅读全文
posted @ 2013-03-25 10:09 汉城 阅读(254) 评论(0) 推荐(0)
摘要:SCRIPT LANGUAGE="JavaScript"> <!-- //出处:网上搜集 // Trim() , Ltrim() , RTrim() String.prototype.Trim = function() { return this.replace(/(^\s*)|(\s*$)/g, ""); } String.prototype.LTrim = function() { return this.replace(/(^\s*)/g, ""); } String.prototype.RTrim = functi 阅读全文
posted @ 2013-03-21 10:54 汉城 阅读(279) 评论(0) 推荐(0)
摘要:备注 阅读全文
posted @ 2013-01-23 12:52 汉城 阅读(149) 评论(0) 推荐(0)
摘要:<!DOCTYPE HTML><html><body>Makes XHR request every 50ms. Watch the memory. Fixes XHR leak in older IEs.<script>onload = function() { setInterval(function(){ var xhr = new XMLHttpRequest() xhr.open('GET', 'jquery.js', true) xhr.onreadystatechange = function() { 阅读全文
posted @ 2013-01-22 14:06 汉城 阅读(123) 评论(0) 推荐(0)
摘要:javascript:parent.window.location.href  =“地址" javascript:parent.location.href  =“地址" javascript:top.location.href  =“地址" 阅读全文
posted @ 2009-07-02 11:20 汉城 阅读(412) 评论(0) 推荐(0)
摘要:            Page.RegisterClientScriptBlock("clientScript", “”); 阅读全文
posted @ 2009-06-30 09:35 汉城 阅读(136) 评论(0) 推荐(0)
摘要:object.setAttribute(sName, vValue [, iFlags])参数: sName 必填项. String类型,属性名 vValue 必填项. 为属性指定的变量,可以为string, number, 或者 Boolean类型 iFlags 选填. 下面指定的两种 Integer 类型的标志 0 覆盖同名属性. 1 默认值. 为属性添加指定的值.实力<htm... 阅读全文
posted @ 2009-06-29 13:19 汉城 阅读(1079) 评论(0) 推荐(0)
摘要:onmouseover="this.style.cursor='hand' 阅读全文
posted @ 2009-06-24 14:48 汉城 阅读(333) 评论(0) 推荐(0)
摘要:<html xmlns="http://www.w3.org/1999/xhtml" > <head>     <title>Untitled Page</title> </head> <body> <input type="text" onchang... 阅读全文
posted @ 2009-06-19 16:50 汉城 阅读(1117) 评论(1) 推荐(0)
摘要: 阅读全文
posted @ 2008-09-04 14:40 汉城 阅读(227) 评论(0) 推荐(0)
摘要:1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键 no 可用于Table 2. 取消选取、防止复制 3. onpaste="return false" 不准粘贴 4. oncopy="return false;" oncut="return false;" 防止复制 5. IE地址栏前换成自己的图标 6. 可以在收藏夹中显... 阅读全文
posted @ 2008-05-05 23:19 汉城 阅读(202) 评论(0) 推荐(0)