zoukankan      html  css  js  c++  java
  • javascript联动

    function citychange(obj){
    var prov = document.getElementById('prov');

    citysinfo.value = prov.value+obj.value;
    }
    function provchange(obj){
    var city = document.getElementById('city');
    var citysinfo = document.getElementById('citysinfo');

    // 只保留默认提示,其它多余的城市被删除
    city.options.length = 1;
    citysinfo.value = "";
    if(obj.selectedIndex>0){
    for(var i=0; i<citys[obj.selectedIndex-1].length; i++){
    var op = document.createElement('option');
    var txt = document.createTextNode(citys[obj.selectedIndex-1][i]);
    op.appendChild(txt);
    city.appendChild(op);
    }
    citysinfo.value = obj.value;
    }

    }

    window.onload=function(){
    var prov = document.getElementById('prov');

    for(var i=0; i<provs.length; i++){
    var op = document.createElement('option');
    var txt = document.createTextNode(provs[i]);
    op.appendChild(txt);
    prov.appendChild(op);
    }
    }
  • 相关阅读:
    f5版本升级
    f5申请并激活License
    f5时间设置
    f5 SNMP配置
    f5 Syslog管理
    f5单台安装配置
    f5负载均衡算法
    f5 Seldom used
    f5售后查询
    f5基本介绍
  • 原文地址:https://www.cnblogs.com/ZJBEY/p/6581363.html
Copyright © 2011-2022 走看看