Time of Update: 2018-12-03
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>My First Script</title><script type="text/javascript">function test() {var text_string =
Time of Update: 2018-12-03
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>My First Script</title><script type="text/javascript">function test() {var result =
Time of Update: 2018-12-03
<html><head><script type="text/javascript">var g_percentFlag;var g_percent = 0;var g_count = 0;function intervalPercent(path) {g_count += 1;document.getElementById("msg3").value = g_count;if (g_percent < 100) {g_percent +=
Time of Update: 2018-12-03
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>My First Script</title><script type="text/javascript">function test() {var temp =
Time of Update: 2018-12-03
簡潔版:(1)建立空數組:var myArray = [];(2)建立指定長度的數組:var myArray = new Array(10);(3)建立並初始化數組:var myArray1 = ["unix", "windows", "mac os"];var myArray2 = new Array("solaris", "linux", "bsd");(4)長度:(返回長度的整數值)var myArray = [1, 2, 3];var arrayLength =
Time of Update: 2018-12-03
<html><head><title>Web Title</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><script type="text/javascript" src="js/test.js"></script></head><body><input
Time of Update: 2018-12-03
1、文檔表單數組文檔中所有表單,構成的數組。<html><head></head><body><form id="first"></form><form id="second"></form><form id="thrid"></form><script type="text/javascript"><!-- 或者<script
Time of Update: 2018-12-03
function RegExpTest(){ var ver = Number(ScriptEngineMajorVersion() + "." + ScriptEngineMinorVersion()); alert("version=="+ver); if (ver >= 5.5){ // 測試 JScript 的版本。 var src = "The rain in Spain falls mainly in the plain.";
Time of Update: 2018-12-03
//是否為空白校正function isEmpty(s) { var lll=trim(s); if( lll == null || lll.length == 0 ) return true; else return false;}//刪除字串左邊的空格function ltrim(str) { if(str.length==0) return(str); else { var idx=0; while(str.charAt(idx).search(/\s/)==0) idx+
Time of Update: 2018-12-03
JavaScript中可以對內建對象進行擴充。Code highlighting produced by Actipro CodeHighlighter
Time of Update: 2018-12-03
今天碰到一個瀏覽器安全色性的問題,是IE和Firefox下iframe DOM操作的差異。本文借IE和Firefox在iframe DOM操作的不同,進行分析說明JavaScript在DOM操作中兩者的不同。IE和Firefox對iframe document對象的差異性在IE6、IE7中,我們可以使用 document.frames[ID].document 來訪問iframe子視窗中的document對象,可是這是不符合W3C標準的寫法,也是IE下專屬的方法,在Firefox下卻不可以使用,
Time of Update: 2018-12-03
原貼:http://www.blogjava.net/magicdoom/archive/2009/04/04/32555.html學習一下!1.傳值(by value)變數的值被複製出一份,與原來的值將不相干,也就是說即使新的值被修改,原來的值也不會改變,在JavaScript中基本類型都是傳值的.function testPassValue(){ var m=1; var n=2; //將m,n的值複製一份,傳遞到passValue passValue(m,n);
Time of Update: 2018-12-03
<%@ page language="java" import="java.util.*,com.page.wash.giveclothing.*" pageEncoding="gbk"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head>
Time of Update: 2018-12-03
今天與一個同事爭論javascripe中間的線程機制,他爭論說javascript是有線程的,理由即使javascript中間的事件回調就是線程的實現,個人認為在javascript中是沒有線程機制的:理由如下:引自<<精通javascript>> john resig著:<script> <!-- while(!window.loaded); //some operation
Time of Update: 2018-12-03
頁面分頁對於程式員來說最熟悉不過,在WEB開發中經常需要對頁面進行分頁,jQuery外掛程式JQuery Pager分頁器能輕鬆實現javascript分頁功能,只需要幾行代碼,javascript分頁簡單搞定,執行個體效果圖如下使用說明需要使用jQuery庫檔案和JQuery Pager庫檔案(目前版本1.1)素材準備分頁器CSS樣式檔案,可複製如下CSS樣式,可命名為Pager.css#pager ul.pages
Time of Update: 2018-12-03
JSCalendar1.0 jscalendar-1.0.rar (60.78 KB)官方網站:http://www.dynarch.com/projects/calendar/download:http://prdownloads.sourceforge.net/jscalendar/jscalendar-1.0.zip?download應該說是現在最全,最方便的日曆,支援UTF-8及世界上所有的語言,很好用,就是檔案大了一些。 國內的JSCalendar JS.rar (33.04
Time of Update: 2018-12-03
JavaScript彈出新視窗後,關閉新視窗時,重新整理父視窗 這裡有兩個檔案,主要要實現的是點父視窗裡的彈出新視窗(詳細請參考 JS控制視窗常用代碼),將彈出新視窗,在新視窗裡面有兩個方法,一個是重新整理本面,另一個是關閉本頁,同時要重新整理父視窗,其中f.htm為父頁,z.htm為子頁,代碼如下(由於f.htm頁內容不多,可能會重新整理過快而沒看到效果,你可以適當增加內容以便查看效果):f.htm程式碼
Time of Update: 2018-12-03
null是javascript的關鍵字是Object類型,但是常被分為一個單獨的類型表示沒有值undefined也表示沒有值,但是是更深層次的,或者說是系統層級的不是類型,是預先定義好的全域變數類型是undefinedundefined主要出現在 變數已定義,但是為初始化 函數被調用時未傳遞的定義的參數一個對象下不存在的屬性不存在的數組元素沒有傳回值的函數他們的異同與關係都代表沒有值大多數時候可以互換等式 null == undefined 返回true但是 null !==
Time of Update: 2018-12-03
<script> var oPopup; var popTop=50; var mytime; function closemsg(){ try{ clearTimeout(mytime); }catch(e){} oPopup.hide(); } function popshow(){ //window.status=popTop; if(popTop>1160){ closemsg(); return; }
Time of Update: 2018-12-03
來源程式如下: <html><head><title>通過JAVASCRIPT檢查上傳檔案總大小(成功執行)</title><script> function checkFile() { var fso,file,f; fso = new ActiveXObject("Scripting.FileSystemObject"); var totalSize;