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

動態時報?

動態時報?

dsc5 抓meta value的功能雖然還不是很完整... 但一些網站的meta value 已經...

分享到各社群的方式

分享到各社群的方式

每次在寫網站系統時..客戶總會要求希望他們的網站可以有分享到社群網站的功能... 所以把一些常用的方...

動態留言功能調整

動態留言功能調整

guestmap55 最近改進了朋友動態的發文方式.... 一開始在功能方面加上了googlemap...

Recommended reading

Other stories happened at this address

獨自做夢的人一段時間就要拿些事情來鼓勵自己

獨自做夢的人一段時間就要拿些...

s 獨自做夢的人,一段時間就要拿些事情來鼓勵自己。 就算寫個鼓勵的字眼也好~恩.....突然有點悲慘...

數字是不是真的會說話?

數字是不是真的會說話?

以前,在寫下第個網站的那時,我其實非常迷戀數字。 每次看著計數器上數字的跳動,我知道那跳動的不只是數...

When caterpillar grow up become butterfly

When caterpill...

When caterpillar grow up become butterfly

When caterpillar grow up become butterfly

When caterpill...

When caterpillar grow up become butterfly

當兒子非常非常需要你的時候~

當兒子非常非常需要你的時候~...

當兒子非常非常需要你的時候~ 不得不我只好改變我的工作環境.........(╯з╰) 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