Welcome to my website, have a nice day!
Dream it, Do it, Make it!

jquery获取input radio onchange事件


<!DOCTYPE html>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="">
<meta name="keywords" content="">
<link href="" rel="stylesheet">
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $('input:radio[name=bedStatus]').change(function() {
        if (this.value == 'allot') {
            alert("Allot Thai Gayo Bhai");
        else if (this.value == 'transfer') {
            alert("Transfer Thai Gayo");
    <input type="radio" name="bedStatus" id="allot" checked="checked" value="allot">Allot
   <input type="radio" name="bedStatus" id="transfer" value="transfer">Transfer
未经允许禁止转载:Ddmit » jquery获取input radio onchange事件

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址