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

CentOS 5.2 使用 YUM 將 PHP 5.1.6 更新到 5.2.6

CentOS 5.2 使用 ...

CentOS 5. 版內建的 PHP 版本為 5..,甚至於 5. 版仍舊是 5.. 版本。 基於系...

如何用javascript判斷字串中必須包含中英文

如何用javascript判...

字串拆開逐字檢查方式~ 首先將每一個字轉換成 ASCII 碼。 在使用for迴圈去檢查每個字是不是在...

Welcome To Google

Welcome To Goo...

Top第一天,參訪了Google APAC HQ 第一次來到Google,難掩興奮心情,拼命的拍了一...

Recommended reading

Other stories happened at this address

香辣雞柳佐台東的記憶

香辣雞柳佐台東的記憶

s 這是我第一次試著做這道菜。 以前,在台東的時候,我常去一家餐廳(壹里香),總是點同樣的餐「香辣雞...

街角豆漿店的日常

街角豆漿店的日常

每天,我總會先出門到街角豆漿店吃個早餐,趁著Mandy跟U還在夢鄉~ 一個人,喝著咖啡吃著早餐,浪費...

陪著你走

陪著你走

陪著Mandy看港劇,其實也挺有意思的.... 說真的,有時候我真的也會被劇情給感動....隨著劇情...

快樂星期五,外賣天~自從當了爸,假日總是令人期待的( ̄∇ ̄)

快樂星期五,外賣天~自從當了...

快樂星期五,外賣天~自從當了爸,假日總是令人期待的( ̄∇ ̄)

字母疊疊樂

字母疊疊樂

經過了好幾次的失敗,最後終於把數字、字母疊成高樓。 說真的,我非常佩服Mandy的耐心,在U失敗鬧脾...

5G滿三個月

5G滿三個月

G滿三個月了。 最近有一點咳嗽,看來還是加入了我們是一家人的行列(╯з╰) 奶量非常難抓,有時cc ...

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