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

PHP數字1000分位逗號分隔函數number_format()

PHP數字1000分位逗號分...

有時候我們必需將數字加上每三個位數加上一個逗號(千分位),例如變成,,我雖不常用...但偶爾要用到時...

Linux底下Apache啟動、停止、重啟指令

Linux底下Apache啟...

a5 如果apache安裝成為linux的服務的話,可以用以下命令操作: service httpd...

在PHP裡面如何做到基本的SQL injection防禦?

在PHP裡面如何做到基本的S...

資訊安全一直是很頭痛的問題....我一直以來也在尋找最好的方式... 但在尋找的過程中...至少也得...

Recommended reading

Other stories happened at this address

在手機上如何建立網址到手機桌面中並且使用圖示

在手機上如何建立網址到手機桌...

上回做專案時,客戶說了手機桌面上的網站捷徑太醜,想要美化。 這回索性也幫Innstory美化一下,順...

第一次吃副食品,你這表情也太有戲了吧!! 是有難吃到這樣嗎?

第一次吃副食品,你這表情也太...

第一次吃副食品,你這表情也太有戲了吧!! 是有難吃到這樣嗎?

爸爸,卡住啊~

爸爸,卡住啊~

前陣子U學會個單字。 一個是「怕怕 」,另一個是「 卡住啊」 而且這個單字似乎是他目前最喜歡使用的。...

獨自一個人的2個星期,第2晚,手機上傳來兒子的新把戲。

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

一早醒來,發現床原來是這麼的大,而且我還睡在Mandy的位子上。 想想以往我都是睡在床邊上,現在床變...

我們家提前過月亮節囉~

我們家提前過月亮節囉~

我們家提前過月亮節囉~

豬腳麵線

豬腳麵線

搞定U跟G後。 假日的晚餐。 煮了一把麵線配上家鄉媽媽滷的豬腳。 簡單吃。

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