<script>
function w_linkage(id_type)
{
var selected = $("#linkage_"+id_type+"_triger").find("option:selected").text();
switch (selected)
{
case 'APA':
document.getElementById("linkage_"+id_type+"_echo").readOnly=false;
break;
default :
case 'AMS':
document.getElementById("linkage_"+id_type+"_echo").value="";
document.getElementById("linkage_"+id_type+"_echo").readOnly=true;
break;
}
}
</script>
                <tr>
<td>位置分类: </td>
<td >
<select class="form-control linkage_triger " name="page_position" onclick="w_linkage('add')" id="linkage_add_triger" >
<option value="2" >APA</option>
<option value="1">AMS</option>
</select>
</td>
</tr>
<tr>
<td>keyword:</td>
<td><input type="text" name="keyword"></td>
</tr>
<tr>
<td>brand:</td>
<td><input type="text" name="brand"></td>
</tr>
<tr>
<td>adasin:</td>
<td><input type="text" name="adasin" placeholder="选AMS时,请跳过" id="linkage_add_echo"></td>
</tr>
         <tr>
<td>位置分类: </td>
<td>
<select class="form-control" name="page_position_edit" onclick="w_linkage('edit')" id="linkage_edit_triger" >
<option value="2" >APA</option>
<option value="1">AMS</option>
</select>
</td>
</tr>
<tr>
<td>keyword:</td>
<td><input type="text" name="keyword_edit" value="<?= $_GET['keyword']?>"></td>
</tr>
<tr>
<td>brand:</td>
<td><input type="text" name="brand_edit" value="<?= $_GET['brand']?>"></td>
</tr>
<tr>
<td>adasin:</td>
<td><input type="text" name="adasin_edit" placeholder="选AMS时,请跳过" value="<?= $_GET['adasin']?>" id="linkage_edit_echo"></td>
</tr>

//readyonly  交互,不绑架输入

// add edit  为同一脚本

问题:

 document.getElementById("linkage_"+id_type+"_echo").innerHTML="";
document.getElementById("linkage_"+id_type+"_echo").innerText="";
$("#linkage_"+id_type+"_echo").emprt();;

为什么失效?

04-14 01:33