html + ajax +php 二级联动下拉框
<!DOCTYPE html>
<html>
<head>
</head>
<style>
.sel{
width:200px;
height:40px;
}
</style>
<body>
<select id="sel" onchange="fun()" class="sel">
<option value="1">支付宝</option>
<option value="2">微信</option>
<option value="3">QQ</option>
</select>
<select id="sel1" class="sel">
</select>
</body>
<script src="/jquery.min.js"></script>
<script>
function fun(){
var sel = document.getElementById("sel").value;
$.ajax({
type:'GET',
url:'/index.php?type=get&code='+sel,
dataType:'json',
success:function(msg){
var sel1 = '';
msg.forEach(function(msg,index,array){
sel1=sel1+'<option valu