zoukankan      html  css  js  c++  java
  • 最简单的省市区级联

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

    <html>
    <head>
    <title>最简单的省市县级联</title>
    <script type="text/javascript" src="../Region.js"></script>
    </head>

    <body>

    <span>*</span> 省
    <select id="sel_Province" style="80px" name="sel_Province">
    </select>
    <span>*</span> 市
    <select id="sel_City" name="sel_City">
    </select>
    <span>*</span> 县/区
    <select id="sel_County" name="sel_County">
    </select>

    <script>
    AreaSelector().init();

    function getValue(id)
    {
    var sel = document.getElementById(id);
    if (sel && sel.options)
    {
    alert(sel.options[sel.selectedIndex].value);
    }
    }

    function getText(id)
    {
    var sel = document.getElementById(id);
    if (sel && sel.options)
    {
    alert(sel.options[sel.selectedIndex].text);
    }
    }
    </script>
    <br><br>
    <input type="button" value="省选项值" onclick="getValue('sel_Province')" />
    <input type="button" value="省选项文本" onclick="getText('sel_Province')" />

    <input type="button" value="市选项值" onclick="getValue('sel_City')" />
    <input type="button" value="市选项文本" onclick="getText('sel_City')" />

    <input type="button" value="县/区选项值" onclick="getValue('sel_County')" />
    <input type="button" value="县/区选项文本" onclick="getText('sel_County')" />
    </body>
    </html>

  • 相关阅读:
    hbase安装(zookeeper等)
    虚函数表以及RTTI阅读(阅后焚)
    void及void指针含义的深刻解析
    泛型和模版的区别
    C++析构函数为什么要为虚函数
    C++对象模型
    在C++中子类继承和调用父类的构造函数方法
    什么是复合类型
    C++ read
    gdb 调试c/c++的一些小技巧
  • 原文地址:https://www.cnblogs.com/youxianyen/p/6027012.html
Copyright © 2011-2022 走看看