zoukankan      html  css  js  c++  java
  • 单选(radio)按钮点击事件

    代码:
    <div id="radio-button-div" style="display: inline;">
    <fieldset data-role="controlgroup" data-type="horizontal" style="text-align: center; height: 50px;">
    <input type="radio" name="radio-choice-h-2" id="radio-choice-h-2a" value="camera1" >
    <label id="radio-camera1-label" for="radio-choice-h-2a">Camera 1</label>
    <input type="radio" name="radio-choice-h-2" id="radio-choice-h-2b" value="camera2" checked="checked">
    <label id="radio-camera2-label" for="radio-choice-h-2b">Camera 2</label>
    </fieldset>
    </div>
    点击事件:
    $("input[name=radio-choice-h-2]").click(function(){
    switch($("input[name=radio-choice-h-2]:checked").attr("id")){
    case "radio-choice-h-2a":
      alert(“click camera1");
    break;
    case "radio-choice-h-2b":
      alert(“click camera2");
    break;
      default:
    break;
    }
    });
  • 相关阅读:
    hive表链接
    hive聚合函数和表生成函数
    hive条件函数
    hive日期函数
    hive之size函数和cast转换函数
    hive数学函数
    hive排序
    5G基站概述
    MEC边缘云平台
    ELK日志系统的架构
  • 原文地址:https://www.cnblogs.com/muhy/p/13685681.html
Copyright © 2011-2022 走看看