나는 cakephp에 의해 생성 된 radiobuttons 그룹을 가지고 있습니다.라디오 버튼 그룹, 변경 이벤트?
<input type="radio" name="data[hexInput]" id="HexInput1" value="h1">
<input type="radio" name="data[hexInput]" id="HexInput2" value="h2">
<input type="radio" name="data[hexInput]" id="HexInput3" value="h3">
그룹의 라디오 버튼 중 하나가 선택되었는지 확인하는 방법이 있습니까? 변화 사건이나 뭐 때문에?
특정 버튼을 사용하지만 그룹과 함께하는 방법은 알고 있습니다. 특정 단추의 경우이 Js 도우미를 사용하십시오.
$this->Js->get('HexInput2')->event('change', $this->Js->request(array(
'controller' => 'designer',
'action' => 'test',
), array(
'update' => '#resultDiv',
'async' => true,
'method' => 'post',
'dataExpression' => true,
'data' => $this->Js->serializeForm(array(
'isForm' => false,
'inline' => true
))
))
);
시도처럼 뭔가를 찾고 생각 클릭으로 변경 –
jQuery를 사용하고 있습니까? –