重慶分公司,新征程啟航
為企業提供網站建設、域名注冊、服務器等服務
為企業提供網站建設、域名注冊、服務器等服務
!DOCTYPE?html
成都創新互聯公司于2013年成立,是專業互聯網技術服務公司,擁有項目成都做網站、成都網站設計網站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元廬山做網站,已為上家服務,為廬山各地企業和個人服務,聯系電話:18980820575
html?lang="en"
head
meta?charset="UTF-8"
meta?name="viewport"?content="width=device-width,?initial-scale=1.0"
meta?http-equiv="X-UA-Compatible"?content="ie=edge"
titleDocument/title
script?src=""/script
/head
body
p
label?for="radio_a"A/label
input?type="radio"?name="edit"?id="radio_a"?value=""
input?type="text"?disabled?/
/p
p
label?for="radio_b"B/label
input?type="radio"?name="edit"?id="radio_b"?value=""
input?type="text"?disabled?/
/p
script?async?defer
$(document).ready(function()?{
$('input[type="radio"]').change(function(e)?{
var?self?=?this
$('input[type="text"]').prop('disabled',?true)
$(self).next().prop('disabled',?false)
$(self).next().focus()
})
})
/script
/body
/html
獲取單選框的值有三種方式:\x0d\x0a\x0d\x0a1、$('input:radio:checked').val();\x0d\x0a2、$("input[type='radio']:checked").val();\x0d\x0a3、$("input[name='rd']:checked").val();
你獲取的值的方法之前有沒有見觸發的條件?比如blur?focus?click?等等。如果沒有的話
他只會頁面剛加載的時候執行一次
,
所以就只能獲得一次值了。