0
我在下面的代碼,它顯示resp
,但如果我從輸入中刪除值。當輸入被刪除時,我有辦法清除課程嗎?如果更改清除div
代碼:
{
if (resp == '') { }
else {
$(".error").text(resp);
}
},
error: function (resp) {
console.log(data);
}
調用:
$(document).ready(function() {
$('.postForm').on('blur', '#post_title', function (e) {
$(".postForm #post_url_link").blur();
});
function postTitleCheck() {
$(".postForm #post_title").blur();
}
});
以清除利用.empty(),用於例如方法。 $(「。error」)。empty() –
@SohilDesai雖然 –
這段代碼是如何調用的 –