2009年04月29日

取得選取元件值

很重要,可是都會忘記,記錄一下:
$('select.foo option:selected').val();    // get the value from a dropdown select
$('input:checkbox:checked').val(); // get the value from a checked checkbox
$('input:radio[name=bar]:checked').val(); // get the value from a set of radio buttons


Posted by aj2007 at 樂多Roodo! │15:04 │回應(0)引用(0)jQuery
樂多分類:日記/一般 工具:編輯本文
Ads by Roodo! 

引用URL

http://cgi.blog.roodo.com/trackback/8820461