摘要:
hashCode = function(str){ var hash = 0; if (str.length == 0) return hash; for (i = 0; i < str.length; i++) { char = str.charCodeAt(i); hash = ((hash<<5)-hash)+char; hash = hash & hash; // Convert to 32bit integer } return hash;}djb2Code = function(str){ var has... 閱讀全文
posted @ 2013-09-27 16:27
穆乙
閱讀(14168)
評(píng)論(0)
推薦(2)
摘要:
1.動(dòng)態(tài)創(chuàng)建selectfunction createSelect(){var mySelect = document.createElement_x("select"); mySelect.id = "mySelect"; document.body.appendChild(mySelect); }2.添加選項(xiàng)option function addOption(){ //根據(jù)id查找對(duì)象, var obj=document.getElementByIdx_x('mySelect'); //添加一個(gè)選項(xiàng)obj.add(new Option 閱讀全文
posted @ 2013-09-27 15:57
穆乙
閱讀(2998)
評(píng)論(0)
推薦(0)

浙公網(wǎng)安備 33010602011771號(hào)