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

ajax防止重複提交

ajax防止重複提交

會發生重提交的原因,大致上是因為考驗人與系統間的耐性~ AJAX(非同步的JavaScript與XM...

php函式紀錄

php函式紀錄

常常忘記,只得紀錄下來...... AddSlashes: 字符串加入斜線。 binhex: 二進位...

無障礙網頁accesskey

無障礙網頁accesskey...

accesskey 無障礙網頁導盲磚。 是為了要方便有需求的人,可利用鍵盤即可快速瀏覽網頁切換網頁位...

Recommended reading

Other stories happened at this address

PHP取得檔案路徑及檔案名稱

PHP取得檔案路徑及檔案名稱...

例如我有一支檔案是放在根目錄下的demo資料夾中,檔案名稱為test.php 、首先取得目前網頁的檔...

我以前不可能做這些事~

我以前不可能做這些事~

我以前~ 不可能在坐在電腦前時還得抱著你。 不可能在應該拿著滑鼠的手卻得要拿著奶瓶。 不可能走在外頭...

努力過的汗水最令人激賞!!

努力過的汗水最令人激賞!!

明明是在冷氣房裡,卻弄到滿頭大汗。 因為~他剛剛努力的用力,並且完成大便的使命。 就知道你可以的兒子...

沒有菸抽的日子

沒有菸抽的日子

老婆臨盆在即,但確不知道是何時。 兒子感冒,沒了精神沒了食慾。 手邊的專案號要交測試連結。 之前還有...

鹽烤香魚

鹽烤香魚

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

懷念的防無聊小品遊戲釣魚

懷念的防無聊小品遊戲釣魚

說了我念舊不是沒有原因的...... 剛剛在電腦裡找資料....又翻到了這個~ game 有印象嗎?...

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