<!DOCTYPE html>
<html> <head>
<meta charset="UTF-8">
<title></title>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.js"></script>
</head>
<!-- <script>
$(function() {
//隐藏div $("#shouhou2").hide();
$("#shouhou3").hide();
//给div添加change事件
$("#type").change(function() {
if($(this).val() == 1 ) {
$("#shouhou1").show();
$("#shouhou2").hide();
$("#shouhou3").hide();
} else if($(this).val() == 2 ) {
$("#shouhou2").show();
$("#shouhou1").hide();
$("#shouhou3").hide();
}
else if($(this).val() == 3 ) {
$("#shouhou3").show();
$("#shouhou1").hide();
$("#shouhou2").hide();
}
})
})
</script> --> <body>
<select name="" onchange="select(this)">
  <option value="1">题目一</option>
  <option value="2">题目二</option>
  <option value="3">题目三</option>
  <option value="4">题目四</option>
</select> <div>   <div id="div1">内容一</div>   <div id="div2" style="display:none">内容二</div>   <div id="div3" style="display:none">内容三</div>   <div id="div4" style="display:none">内容四</div> </div> <script> function select(obj){
$("#div" + obj.value).show().siblings().hide(); }
</script> <!-- <select class="select" size="1" name="type" id="type"> <option value="1">表格</option>
<option value="2">折线图</option>
<option value="3">柱状图</option> </select>
<div id="shouhou1" style>表格区域</div>
<div id="shouhou2" style>折线图区域</div>
<div id="shouhou3" style>柱状图区域</div> -->
</body> </html>

最新文章

  1. linux安装VMware-tools,
  2. 小菜学习Winform(四)MDI窗体(附示例)
  3. UICollectionViewCell选中高亮状态和UIButton的高亮状态和选中状态
  4. Spring中使用Quartz
  5. JAVA 集合List,数组,Set,Map,直接的相互转换
  6. PHP - 5.4 Array dereferencing 数组值
  7. HttpContext.Current.Session=null问题
  8. C 语言 ----位运算
  9. if...else if...else
  10. FindWindowEx使用方法
  11. 设置SVN忽略文件和文件夹(文件夹)
  12. 第5章 不要让线程成为脱缰的野马(Keeping your Threads on Leash) ---线程优先权(Thread priority)
  13. 重新初始化VS2010
  14. __x__(13)0906第三天__xhtml 的语法规范
  15. w3m 在ubuntu中的使用
  16. const和define的差别
  17. hbase和zookeeper的安装和部署
  18. 每天定时备份mysql数据库任务
  19. return 0;和exit(0);的区别
  20. 微信小程序自定义事件

热门文章

  1. new/delete与命名空间
  2. 函数的练习2——python编程从入门到实践
  3. centos7编译安装memcached
  4. 当base-package=&quot;controller.*&quot;时,可见packageSearchPath为&quot;classpath*:controller/*/**/*.class&quot;: 当base-package=&quot;controller.**&quot;时,可见packageSearchPath为&quot;classpath*:controller/**/**/*.class&quot;:
  5. javascript 同源策略和 JSONP 的工作原理
  6. 正则表达式&quot;(^|&amp;)&quot; ,什么意思?
  7. mabatis缓存
  8. nlp-roadmap
  9. Spring Boot + RabbitMQ 配置参数解释
  10. Java中关于Math的几个取整方法的区别