分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.youkuaiyun.com/jiangjunshow
也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!
html/js代码如下:
<html><body><select id="first" onChange="change()"> <option selected="selected">湖北</option> <option>广东</option></select><select id="second"> <option>黄冈</option> <option selected="selected">武汉</option></select><script>function change(){ var x = document.getElementById("first"); var y = document.getElementById("second"); y.options.length = 0; // 清除second下拉框的所有内容 if(x.selectedIndex == 0) { y.options.add(new Option("黄冈", "0")); y.options.add(new Option("武汉", "1", false, true)); // 默认选中省会城市 } if(x.selectedIndex == 1) { y.options.add(new Option("深圳", "0")); y.options.add(new Option("广州", "1", false, true)); // 默认选中省会城市 y.options.add(new Option("肇庆", "2")); }}</script> </body></html>

给我老师的人工智能教程打call!http://blog.youkuaiyun.com/jiangjunshow
