天天看點

input輸入框為空提示内容變化

// 如果輸入内容為空
var captionTxt = $(".caption").text();
if(!inputContent){
	$(".caption").text("請輸入内容").animate({opacity: 1.25}, 3000, function(){
		$(this).text(captionTxt);
	});
	$("#inputContentArea").val("").focus();
	return;
}      

DEMO