【发布时间】:2013-05-22 07:46:02
【问题描述】:
我的应用中有一个 jquery 对话框。
这就是它的制作方法
var routePopup = "Route Name : <input type='text' id='routeName' name='routeName'/>";
document.getElementById('popUp').innerHTML = "";
document.getElementById('popUp').innerHTML = routePopup;
$("#popUp").dialog({
title: "Route Name",
resizable: false,
width: auto,
height: auto,
buttons: {
"Create Route": function () {
$(this).dialog("close");
}
}
});
现在我想检查文本框是否为空。如果它是空的,那么它不应该允许关闭弹出窗口。
还应该在顶部给出消息,该值不能为空。
【问题讨论】:
-
Check if textbox has empty value 或 check if text box is empty then run code 的可能重复项此外,您还要求解决 3 个问题。在寻求解决方案的帮助时,您应该添加一些 the code you have tried 来解决这 3 个问题。
标签: javascript jquery