Time of Update: 2018-12-06
把《Ajax基礎教程》快速翻閱完了,記點學習筆記。原型繼承與類式繼承是本人沒有弄懂的。下面是 Bob Clary 編寫的類式繼承通用函數:function createInheritance(parent, child) { var property; for(property in parent) { if(!child[property]) { child[property] = parent[property]; } }}
Time of Update: 2018-12-06
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1function addBookmark() { 2 var links = document.getElementsByTagName('a'); 3 if(!links) return; 4 for(var i=0; i<links.length; i++) { 5
Time of Update: 2018-12-06
JavaScript language overviewJavaScript syntax, operators, and flow-control statements are similar to those in the C language. It includes if, else, switch, break, for, while, do, and return statements which behave almost identically to their C
Time of Update: 2018-12-06
動態原型方法:在建構函式內定義非函數屬性,而函數屬性則利用原型屬性定義。function Car(sColor,iDoors,iMpg) { this.color=sColor; this.doors=iDoors; this.mpg=iMpg; this.drivers=new Array("Mike","Sue"); if(typeof Car._initialized=="undefined")
Time of Update: 2018-12-06
嚴格來說已經很難說是 IE 的錯,但按照經驗通常你對 IE 進行折騰,例如 IE6 升到 IE7/IE8,或重裝,不同程度的第三方軟體的修複,一般都不能解決問題。如果一定需要一個理由,應該是在某年某日中了某個木馬升級了某個補丁或者卸載某個軟體,而導致某個組件某個動態擴充被反註冊掉而無法支援某種效果……說到這裡,要說說 regsvr32 命令,是一個註冊 DLL 動態擴充庫的命令列工具。方法:在“運行”裡面輸入regsvr32 dllname,斷行符號即可。使用上有幾個參數:/u——反註冊控制項/
Time of Update: 2018-12-06
<html><head><SCRIPT LANGUAGE=javascript><!--function setPrint(){myprint.ExecWB(8,1);}function previewPrint(){myprint.ExecWB(7,1)}//--></SCRIPT></head><body><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C
Time of Update: 2018-12-06
在ASP.NET中,獲得檔案的實體路徑可以使用server.mapPath()方法得到,而在JavaScript中則是沒有這個方法的,這裡給出JavaScript如何獲得檔案的路徑: Code highlighting produced by Actipro CodeHighlighter
Time of Update: 2018-12-06
下面就是實現效果所需代碼:function click(e) {if (document.all) {if (event.button==1||event.button==2||event.button==3) {oncontextmenu='return false';}}if (document.layers) {if (e.which == 3) {oncontextmenu='return false';}}}if (document.layers)
Time of Update: 2018-12-06
JavaScript進階程式設計:第2版(china-pub首發) 基本資料原書名: Professional JavaScript for Web Developers 原出版社: Wrox 作者: (美)Nicholas C. Zakas 譯者: 李松峰 曹力 叢書名: 圖靈程式設計叢書 Web開發系列 出版社:人民郵電出版社 ISBN:9787115230959 上架時間:2010-7-12 出版日期:2010 年7月 開本:16開 頁碼:600
Time of Update: 2018-12-06
《編寫可維護的JavaScript》基本資料作者: (美)Nicholas C. Zakas [作譯者介紹]譯者: 李晶 郭凱 張散集出版社:人民郵電出版社ISBN:9787115310088上架時間:2013-3-10出版日期:2013 年3月開本:16開頁碼:280版次:1-1所屬分類:電腦 > 軟體與程式設計 > 網路編程 > javascript更多關於
Time of Update: 2018-12-06
這裡對於一些經典的常用javascript進行摘抄,便於在做項目的時候查閱: Code highlighting produced by Actipro CodeHighlighter
Time of Update: 2018-12-06
要完成此效果需要三個步驟 第一步:把如下代碼加入到<head>地區中
Time of Update: 2018-12-06
引文詳見:JavaScript中的arguments,callee,caller,call,appy代碼及理解如下:codeCode highlighting produced by Actipro CodeHighlighter
Time of Update: 2018-12-06
代碼Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1
Time of Update: 2018-12-06
今天coding時,發現系統有一個地方是需要做全形自動轉半形的,就從網上搜到了下面的東西檢查全形半形var s = "bABD1232232";var strCode;for(var i=0;i<s.length;i++){ strCode = s.charCodeAt(i); if((strCode>65248)||(strCode==12288)) //12288是空格 { alert("有全形!");
Time of Update: 2018-12-06
1. 定義類型function userobject(parameter) {}parameter 可省略,相當於C#中建構函式參數。 2. 執行個體化自訂類型<script type="text/javascript">function userobject(parameter){}//myobject is now an object of type userobject!var myobject=new
Time of Update: 2018-12-06
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML> <HEAD> <TITLE> New Document </TITLE> <META NAME="Generator" CONTENT="EditPlus"> <META NAME="Author" CONTENT=""> <META
Time of Update: 2018-12-06
父表單js代碼(開啟子表單):js_open 1 <script type="text/javascript"> 2 //開啟強制回應對話方塊 取得傳回值 3 function OpenModalDialog() { 4 //用一個value來接受傳回值 5 var value = window.showModalDialog("ModalDialogChild.aspx", "ModalDialog",
Time of Update: 2018-12-06
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type"
Time of Update: 2018-12-06
RegExp對象(至今為止我看到過的最通俗易懂和深入的Regex教程)JavaScript提供了一個RegExp對象來完成有關Regex的操作和功能,每一條Regex模式對應一個RegExp執行個體。有兩種方式可以建立RegExp對象的執行個體。 使用RegExp的顯式建構函式,文法為:new RegExp("pattern"[,"flags"])。