您的位置:首页 > 移动开发

jquery append() 追加内容 remove() 删除回调

2018-03-07 18:07 274 查看
Html
<div class="row1 height28 s_consignee_city"></div>
<select name="shipping_method" class="selectForm" onchange="getShipCost();changeProductBarStyle(),changeSalesValesShow()" style="width:263px;">

js
//根据运输方式查看邮编与城市对应关系的验证
function getShipCost(){
var ship_method = $('[name =shipping_method]').val();
if (ship_method == "ESEXP") {
$("#look_over").remove();
$(".s_consignee_city").append("<a href='/file/Spain_City.xls' id='look_over' style='color:red'>查看</a>");
} else if (ship_method == "AUEXP") {
$("#look_over").remove();
$(".s_consignee_city").append("<a href='/file/auexp-city.xls' id='look_over' style='color:red'>查看</a>");
} else {
$("#look_over").remove();
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: