摘要:
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)
評論(0)
推薦(2)
摘要:
1.動態創建selectfunction createSelect(){var mySelect = document.createElement_x("select"); mySelect.id = "mySelect"; document.body.appendChild(mySelect); }2.添加選項option function addOption(){ //根據id查找對象, var obj=document.getElementByIdx_x('mySelect'); //添加一個選項obj.add(new Option 閱讀全文
posted @ 2013-09-27 15:57
穆乙
閱讀(2998)
評論(0)
推薦(0)

浙公網安備 33010602011771號