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

找對方法,開創自己的網路流量

找對方法,開創自己的網路流量...

前些天,Tim傳來了一個消息...http://classt...

圖型插件Elastislide

圖型插件Elastislid...

teach Elastislide是一款好用的圖形插件......

動態留言功能調整

動態留言功能調整

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

Recommended reading

Other stories happened at this address

口腔期加上爬行,有時候不禁懷疑我養的到底是小孩還是蛞蝓?

口腔期加上爬行,有時候不禁懷...

口腔期加上爬行,有時候不禁懷疑我養的到底是小孩還是蛞蝓?

鹽烤香魚

鹽烤香魚

香魚我是很愛吃,但從來沒自己調理過.... 假日,表姐為了讓孕媽咪多補充點營養。所以帶上一盒香魚過來...

串接opendata氣象資訊

串接opendata氣象資訊...

研究了幾天的opendata(政府資訊開放平台)https:...

小老虎探險~

小老虎探險~

s 住家後頭的小公園,是我們每天都會經過幾次的地方~ 早上,去吃早餐,我們會讓U在這公園小徑上走著。...

這是~菠蘿麵包.....

這是~菠蘿麵包.....

我記得我買的是菠蘿麵包..... 怎麼被U吃過後,突然覺得這麵包很可憐啊~~~ 這傢伙只給我拔下那金...

今天又多喝了一杯咖啡!

今天又多喝了一杯咖啡!

我愛咖啡....愛他的香氣還有喝咖啡時的那種悠閒..... 上午順利的在客戶那邊做完教育訓練.......

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