js 动态增加,删除标签

var singlePrice = mini.get("singlePrice");
singlePrice.on("focus", function () {
var tmp = document.createElement('text');
tmp.innerHTML = "请填写自行保价或保价金额。";//补全你的内容
$("#singlePrice").parent().append(tmp);
})
singlePrice.on("blur", function () {
$("#singlePrice").parent().find('text').remove();
})

猜你喜欢

转载自www.cnblogs.com/jfww/p/12179115.html