跳到主要內容

發表文章

目前顯示的是 2月, 2009的文章

[JavaScript]HTML DOM Select Object

--Collections |--[collection] options[] Returns an array of all the options in a dropdown list --Properties |--disabled Sets or returns whether or not a dropdown list should be disabled |--form Returns a reference to the form that contains the dropdown list |--id Sets or returns the id of a dropdown list |--length Returns the number of options in a dropdown list |--multiple Sets or returns whether or not multiple items can be selected |--name Sets or returns the name of a dropdown list |--selectedIndex Sets or returns the index of the selected option in a dropdown list |--size Sets or returns the number of visible rows in a dropdown list |--tabIndex Sets or returns the tab order for a dropdown list |--type Returns the type of form element a dropdown list is --Standard Properties |--className Sets or returns the class attribute of an element |--dir Sets or returns the direction of text |--lang Sets or returns the language code for an element |--title Sets or returns an elem

[Javascript]用IE執行window.location.href 無效解決方案

在html(包含jsp.asp)檔案中某些時候用IE瀏覽頁面 如果有這段Javascript window.location.href="http://www.yahoo.com.tw"; 有些時候並無法正常把頁面導到 http://www.yahoo.com.tw 需要改寫成 var newUrl = url; setTimeout(function(){ window.location = newUrl;}, 0); 這樣才會正常執行