Time of Update: 2013-12-01
Regex文法一個Regex就是由一般字元(例如字元a
Time of Update: 2013-12-01
/** * 建立人:xxx * 建立時間:2012-04-12 * JS擷取URL地址 * @returns 返回URL 如:http://localhost:8080 */ function getURL(){ var curWwwPath = window.document.location.href;
Time of Update: 2013-12-01
backbone,英文意思是:勇氣,
Time of Update: 2013-12-01
在實際開發中全選操作會經常用到,這裡簡單的寫了個Jquery的全選外掛程式,方便以後直接調用[javascript]/** jQuery lightweight plugin CheckAll* Original author: Suifengshiqu* Further changes, comments: lvbo1988@gmail.com*/ /* 表格全選外掛程式 */ /* 使用方法 */ /*
Time of Update: 2013-12-01
剛才寫的居然丟掉了,鬱悶,重新謝了。支援多次匹配的方式:js 代碼1. var testStr = "now test001 test002"; 2. var re = /test(\d+)/ig; 3. var r = ""; 4. while(r = re.exec(testStr)) {
Time of Update: 2013-12-01
你是否遇到過這樣的情況,寫了個function,無參數。Js代碼 1. function showUserInfo(){ 2.
Time of Update: 2013-12-01
/* $.ajax({ url : url, type : 'POST', data :
Time of Update: 2013-12-01
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head><meta
Time of Update: 2013-12-01
在HTML5 中,新增加了data-attributes屬性,可以在頁面級儲存一些資料,比如:Java代碼 1. <body> 2. <div data-site="www.codeguru.com" data-category="Technology">Hi, Welcome to HTML 5 data
Time of Update: 2013-12-01
jquery.mask.js[javascript](function($) { $.fn.Popup = function() { return $(this).live("click", function(e)
Time of Update: 2013-12-01
在講這個問題之前,先來補充幾個知識點,如果對此已經比較瞭解可以直接跳過 1. 大多數遊覽器的組件構成 在最底層的三個組件分別是網路,UI後端和js解譯器。作用如下: (1)網路- 用來完成網路調用,例如http請求,它具有平台無關的介面,可以在不同平台上工作 (2)UI 後端-
Time of Update: 2013-12-01
1.延時指令碼啟動並執行方法:方法一:把全部javascript引用放在<body>元素中,頁面內容後,如 1 <html> 2 <head> 3 <title>樣本1</title> 4 </head> 5
Time of Update: 2013-12-01
1.建立對象 View Code 1 var person = new Object();2 person.name = "RuiLiang";3 person.age = 30;4 person.job = "Teacher";5 person.sayName = function () {6 alert(this.name);7 };89
Time of Update: 2013-12-01
在用jquery的post方式傳遞多個值時,在後台頁面可以用數組形式接收如下所示 <script type="text/javascript"> $(function () { timestamp = 0;
Time of Update: 2013-12-01
在java web開發中,我們經常要用到列表框,特別在系統的許可權管理中,如所示,要實現如上效果,請看下面的原始碼:原始碼如下:<html><head><title>全選效果</title><script src="jquery.js"></script></head><body background="3.png"><div id="left&
Time of Update: 2013-12-01
Cookie.js[javascript] /*** @name Cookie.js* 這應該是一個比較老式的cookie工具了,如果想用這個工具類儲存一下* 不重要的東西還是可以的(如狀態等等),使用者名稱和密碼就別想了*/ /*** 儲存* @param {Object} name* @param {Object} value*/ JpkFrame.saveCookie = function(name, value){ //
Time of Update: 2013-12-01
我想萃取有關繼承技術的精華到一個簡單、可重用、容易理解且不會有任何依賴的形式實現。此外,我也想讓這個結果簡單而且非常有用。這有一個我想要的效果的例子:var Person = Class . extend ( { init: function ( isDancing ) { this . dancing = isDancing; } ,
Time of Update: 2013-12-01
網頁禁止滑鼠功能代碼 這個代碼以前在網上找的,試用效果不錯,放這裡留備份,我想這個也能算是常用的代碼之一了。當然啦,查看源碼時滑鼠肯定可以用啦,不過,有時不用想那麼複雜、要求那麼強大,況且源碼中的代碼比文本多。1 <script language=JavaScript>2 document.oncontextmenu=new
Time of Update: 2013-12-01
as的協助文檔現在已經不再內嵌到IDE中了,只能線上看,但是線上看的速度很慢。有一個解決辦法 就是把
Time of Update: 2013-12-01
1. 獲得iframe的window對象存在跨域訪問限制。chrome:iframeElement. contentWindowfirefox: iframeElement.contentWindowie6:iframeElement.contentWindow文章Iframes, onload, and document.domain中說“he iframe element object has a property called contentDocument that