導航:首頁 > 編程語言 > 1920倒計時代碼生成器

1920倒計時代碼生成器

發布時間:2025-09-26 08:39:00

㈠ 200分求javascrapt代碼

別去應付老師了
看看這不到一百行代碼
你會學到很多的
<!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 NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>

<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!--
//--------------------------------------//
//演示函數用法,typeof運算符,for in 用法,數組的內建方法push,pop
function showWindowObj(){

var ary = [];

if(typeof(window) == 'undefined'){

return ;
}

for (var x in window){

ary.push([x ,eval("window." + x)])

}

alert(ary.length);

var record = ary.pop();

ary.push(record);

return ary;
}
alert(showWindowObj().length);
//--------------------------------------//
//演示閉包,for 循環;
(function (){
var arg = [];

for (var i = 0 , j = arguments.length ; i < j ; i++){

arg.push(arguments[i]);
}

alert(arg.join(","));

})('string1','string2');

//--------------------------------------//
//演示原型方法的創建,正則表達式;
String.prototype.trim = function (){

return this.replace( /^\s+|\s+$/g, "" );

}
var str = " a string " , str_trimd;

str_trimd = str.trim();

alert("length of +" + str + " : " + str.length);
alert("length of +" + str_trimd + " : " + str_trimd.length);
//--------------------------------------//
// 演示模擬類的實現,
function Person(name,gender){

this.name = name;
this.gender = gender;
//實例方法
this.sayHello = function (){
alert("hello");
}
}
//類靜態方法
Person.prototype = {

showName : function (){
alert(this.name);
}

,showGender : function (){
alert(this.gender);
}
}

var me = new Person ('myname','male');

me.sayHello();

me.showName();

me.showGender();

//-->
</SCRIPT>
</BODY>
</HTML>

閱讀全文

與1920倒計時代碼生成器相關的資料

熱點內容
網路中常用的傳輸介質 瀏覽:518
文件如何使用 瀏覽:322
同步推密碼找回 瀏覽:865
樂高怎麼才能用電腦編程序 瀏覽:65
本機qq文件為什麼找不到 瀏覽:264
安卓qq空間免升級 瀏覽:490
linux如何刪除模塊驅動程序 瀏覽:193
at89c51c程序 瀏覽:329
怎麼創建word大綱文件 瀏覽:622
裊裊朗誦文件生成器 瀏覽:626
1054件文件是多少gb 瀏覽:371
高州禁養區內能養豬多少頭的文件 瀏覽:927
win8ico文件 瀏覽:949
仁和數控怎麼編程 瀏覽:381
項目文件夾圖片 瀏覽:87
怎麼在東芝電視安裝app 瀏覽:954
plc顯示數字怎麼編程 瀏覽:439
如何辨別假網站 瀏覽:711
寬頻用別人的賬號密碼 瀏覽:556
新app如何佔有市場 瀏覽:42

友情鏈接