zoukankan      html  css  js  c++  java
  • select标签HTML,刚做地。

    <HTML>
    <HEAD>
    <TITLE>页面选择</TITLE>
    <script language='javascript'>
    function selectC()
     {
     
      //var   obj=document.getElementById("b");  
     
      for(var   k=0;k<document.form1.select.length+1;k++)
      {    
        document.form1.select.options.remove( document.form1.select[k]);      //删除所有b下拉列表框中的内容
      } 
      
      if (document.all("bm").value=="生产部")
      {
        document.form1.select.remove(0);
        document.form1.select.options[document.form1.select.options.length]   =   new   Option('工程',  0); 
        document.form1.select.options[document.form1.select.options.length]   =   new   Option('品管',  1);
      }
     
      if (document.all("bm").value=="业务部")
      {
        document.form1.select.remove(0);  
        document.form1.select.options[document.form1.select.options.length]   =   new   Option('总经理',  0);  
        document.form1.select.options[document.form1.select.options.length]   =   new   Option('部门经理',  1);
        document.form1.select.options[document.form1.select.options.length]   =   new   Option('业务助理',  2);   
        document.form1.select.options[document.form1.select.options.length]   =   new   Option('业务员',  3); 
      }
    }
    </script>
    </HEAD>

    <BODY>
     <form name="form1" method="post" action="">
      <select id='bm' name='bm' onchange='selectC()'>
      <option value="请选择">请选择</option>
      <option value="业务部">业务部</option>
      <option value="生产部">生产部</option>
     
      </select>
     <select id='select' name='select' >
       <option value="请选择">请选择</option>
     </select>
     </form>
    </BODY>
    </HTML>

     

  • 相关阅读:
    1.1/1.1.1-玩转Python3金融API应用-easyutils的Readme文件
    1-玩转Python3金融API应用-查阅easytrader家族系列模块
    0-玩转Python3金融API应用-学习查阅API资料的重要性及怎样学
    一句sql搞定身份证校验位
    python爬虫--爬取某网站电影信息并写入mysql数据库
    Mysql简单笔记
    python爬虫--爬取某网站电影下载地址
    android dalvik heap管理分析
    dlmalloc 简析
    low memory killer配置的思考
  • 原文地址:https://www.cnblogs.com/xinxindiandeng/p/1283656.html
Copyright © 2011-2022 走看看