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

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

使FCKeditor所上傳的...

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

黑客松Hackathon(二)

黑客松Hackathon(二...

這是一次不同的體驗... 我一直都渴望有所謂的工作團隊並且享受共同討論共同創作的樂趣... 這次在黑...

PDO連接Mysql方式 MVC上應用

PDO連接Mysql方式 M...

pexelsphoto5 將連結資料庫的方式加入model function connect() {...

Recommended reading

Other stories happened at this address

清炒長年菜佐5U的咿咿呀呀

清炒長年菜佐5U的咿咿呀呀

在台灣,我們客家人一直對長年菜有種特殊的情感。 逢年過節的時候家裡常會煮上鹹菜湯、梅干扣肉...等年...

兄妹

兄妹

綠啊~爸爸在這裡幫妳做個紀錄,讓妳知道你哥哥是怎麼用他的方式來疼愛你的~ 這可是他最喜歡的貼紙啊~ ...

有興趣寫故事的人可以自行加入開始安裝你自己的故事~

有興趣寫故事的人可以自行加入...

innstory 每個人,都有自己的故事。 故事,都值得被紀錄下來。 innstory紀錄你我的故事...

有興趣寫故事的人可以自行加入開始安裝你自己的故事~

有興趣寫故事的人可以自行加入...

innstory 每個人,都有自己的故事。 故事,都值得被紀錄下來。 innstory紀錄你我的故事...

就是要這樣挨著~

就是要這樣挨著~

s 忘了從甚麼時候開始~U睡覺喜歡挨在我身邊。 每當我坐在床上,他會開心的從遠處爬來。 然後一個翻身...

新舊交替,使用phpmyadm出現1064 error in CREATE TABLE … TYPEMYISAM錯誤

新舊交替,使用phpmyad...

sql 系統移機的過程中,最重要的環節....我想...莫過於是系統的環境了....。 這次在協助移...

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