Loading...

如何用javascript接收radio button被選取後的值

Temperature: 0 °C

ChungChung
author_tools

剛剛竟然犯了最簡單的錯誤~

而且還是在趕著時間的時候⊙_⊙

竟然蠢到用接收input 的方式去接收 checked radio value~

搞得一直鬼擋牆一樣,浪費了不少時間。

總之,正確的寫法如下

var radio_value = $("input[name='radio_name'][type='radio']:checked").val();

以上紀錄~
 

台北市內湖區江南街71巷75弄 Go

https://innstory.com/story-如何用javascript接收radio_button被選取後的值-1263
寫程式筆記

Prev
 兒子選得好但這得等你長大啊 ̄∇ ̄

Next
如何用javascript判斷字串中必須包含中英文 

Nearby Attractions

台北市內湖區江南街71巷75弄-Nearby Attractions

  • 臺北第一高女 Go
  • 臺北撫臺街洋樓 Go
  • 龍安坡黃宅濂讓居 Go
  • 臺北孔子廟 Go
  • 監察院 Go
  • 于右任墓 Go

About the Author

Chung

我是chung
網路工作者
主業是網站系統開發建置
副業是做夢,寫故事
作品請參考/teme.biz
做夢請參考/innstory.com
聯絡/chung.teme@gmail.com

#有人用筆寫日記,有人用歲月寫日記,有人用照片寫日記,而我,用innstory寫日記。

Visitor message

Leave some footprints to prove that you visited me

Recommended reading

Author's other related stories

判斷捲軸的位置

判斷捲軸的位置

當捲軸往下移動時,判段目前移動到哪個位置... Javascript部份 $(function(){...

PHP 利用phpmailer 寄信...

PHP 利用phpmaile...

一般來說其實PHP本身已經提供了Mail()函數可以使用,但由於一些令人不愉快的原因...我租用的V...

使FCKeditor所上傳的圖檔檔名亂數化

使FCKeditor所上傳的...

編輯"../fckor/or/filemanager/connectors/php/com...

Recommended reading

Other stories happened at this address

啟動休假模式

啟動休假模式

s 其實打從月日開始,就一直是呈現休假狀態~( ̄∇ ̄) 只是今天下午還是很認份的去客戶那邊做完教育訓...

下雨天,只能在家被小孩玩~

下雨天,只能在家被小孩玩~

下雨天,只能在家被小孩玩~

8個月了,開始進入了孕後期~

8個月了,開始進入了孕後期~...

週,個月了,開始進入了孕後期~ 小傢伙每天都賣力的扭動,深怕我們不知道他的存在似的.... 據Man...

聖誕節快樂,恩~我想從現在開始一直到農曆新年結束...應該都保持休假心態吧XD

聖誕節快樂,恩~我想從現在開...

聖誕節快樂,恩~我想從現在開始一直到農曆新年結束...應該都保持休假心態吧XD

​innstory 更新故事分享功能植入

​innstory 更新故事...

Innstory 更新故事分享功能,花了點時間...但不得不說有時候我真的只是想分享一段文字或幾張照...

獨自一個人的2個星期,第4晚,還好有屏東帶回來的三層肉(蔥爆蕃茄豬肉片)。

獨自一個人的2個星期,第4晚...

s 其實,從昨晚我就已經知道今天晚上要炒個豬肉片來當晚餐。 說實在的,以往單身的日子我鮮少自己下廚。...

Please select an option

error

Hi, thank you for your participation, but you cannot vote repeatedly~

Join innstory now and start recording your story.

"Innstory" is a place to store stories. We are committed to becoming a warm platform. Deepening the bonds between people is our direction.
We are convinced that the blockchain between people is not just a cold calculation. Join us now.

Wrong format