如何解决以下代码中的正则表达式 [英] how to solve Regular expression in Following code
本文介绍了如何解决以下代码中的正则表达式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hello Team
Hello Team
I want to do this:
function validateValues() {
if ($('#batchIDSelect').val() == '' || $('#batchIDSelect').val() == null) {
alert("Pls Select the BatchID");
return false;
}
return true
}
$("#getCountButton").click(function () {
debugger;
if (!validateValues()) {
return;
}
});
If the batchid is empty i want to show the message on page ie:"Pls select the batchid "
That i am not getting.Why is it so??.Where i am getting wrong??.
Thanks
Harshal
亲切协助
谢谢
Harshal
Kindly Assist
Thanks
Harshal
推荐答案
('#batchIDSelect')。val()==''||
('#batchIDSelect').val() == '' ||
('# batchIDSelect')。val()== null){
alert(请选择BatchID);
返回false;
}
返回true
}
('#batchIDSelect').val() == null) { alert("Pls Select the BatchID"); return false; } return true }
(#getCountButton)。click(function(){
debugger;
if(!validateValues()){
return;
}
});
如果batchid为空,我想在页面上显示消息,即:请选择批处理
我没有得到。为什么会这样???我在哪里错误??。
谢谢
Harshal
("#getCountButton").click(function () { debugger; if (!validateValues()) { return; } }); If the batchid is empty i want to show the message on page ie:"Pls select the batchid " That i am not getting.Why is it so??.Where i am getting wrong??. Thanks Harshal
亲切协助
谢谢
Harshal
Kindly Assist
Thanks
Harshal
这篇关于如何解决以下代码中的正则表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文