欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

幾個常用的Javascript函數

系統 2606 0


// *******************************************************
// replacements for unsupported array functions (because arrayname.push(var)
// and arrayname.pop() are not implemented in IE until version 5.5)
function thearrayisgood(thearray,i) {
? ?? ?? ?if ((thearray[i] == "undefined") || (thearray[i] == "") || (thearray[i] == null))
? ?? ?? ?? ? return false;
? ?? ?? ?else
? ?? ?? ?? ? return true;
}

function getarraysize(thearray) {
// replacement for arrayname.length property
? ?? ???for (i = 0; i < thearray.length; i++) {
? ?? ?? ?? ?? ? if ((thearray[i] == "undefined") || (thearray[i] == "") || (thearray[i] == null))
? ?? ?? ?? ?? ?? ?? ?? ?return i;
? ?? ?? ?? ?? ? }
? ?? ???return thearray.length;
}

function arraypush(thearray,value) {
// replacement for arrayname.push(value)
? ?? ???thearraysize = getarraysize(thearray);
? ?? ???thearray[thearraysize] = value;
? ?? ???return thearray[thearraysize];
}

function arraypop(thearray) {
// replacement for arrayname.pop()
? ?? ???thearraysize = getarraysize(thearray);
? ?? ???retval = thearray[thearraysize - 1];
? ?? ???delete thearray[thearraysize - 1];

??????? thearray.length--; <<==我加了這句,很關鍵,否則出錯
????????return retval;
}

// *******************************************************

另外給出網上幾個老外寫的

function Array_pop() {
? var response = this[this.length - 1]
? this.length--
? return response
? }

if (typeof(Array.prototype.pop) == "undefined") {
? Array.prototype.pop = Array_pop
? }

function Array_push() {
? var A_p = 0
? for (A_p = 0; A_p < arguments.length; A_p++) {
?? this[this.length] = arguments[A_p]
?? }
? return this.length
? }

if (typeof Array.prototype.push == "undefined") {
? Array.prototype.push = Array_push
? }



Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=558849


幾個常用的Javascript函數


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: www.亚洲在线 | 免费xxx8888| 久久亚洲精品中文字幕 | 国产成人一区二区 | 国产91福利在线精品剧情尤物 | www.狠狠艹| 欧洲成人午夜免费大片 | 日韩欧美国产偷亚洲清高 | 日韩加勒比在线 | 啊啊啊好紧好爽 | 日本一区二区在线视频 | 欧美成人精品一区二区三区 | 日韩国产欧美在线观看一区二区 | 日韩欧美在线一区 | 欧美日批 | wwwxxx日本在线观看 | 日日操夜夜 | 精品国精品国产自在久国产应用 | 201天天爱天天做 | 国产精品久久久久无码人妻 | 青娱在线 | 国产乳摇福利视频在线观看 | 九九热热九九 | 在线成人免费视频 | 一区二区精品 | 一本大道av | 国产精品色 | 久久亚洲一区二区 | www.国产欧美| 成人免费观看国产高清 | 国产午夜精品一区二区三区 | 欧美日韩国产欧美 | 日本久久视频 | 久久久久在线 | 中文字幕日韩精品在线 | 亚洲午夜久久久精品影院 | 国产一区二区欧美 | 亚洲精选久久 | 日本精品久久久久久久 | 欧美一区二区黄 | 亚洲国产精品综合久久 |