如果值为false,我在java脚本中从日期和日期进行比较我返回false,但程序正在执行。返回false必须在java脚本中停止执行
我的Java脚本代码
function Noofdays() {
var total= document.getElementById('ctl00_MainContent_Txtabc');
var days = document.getElementById('ctl00_MainContent_ddldays');
if (total= days) {
alert("same");
return true;
}
else {
alert("not same");
return false;
}
}
我打电话从保存按钮C#代码此功能,
ScriptManager.RegisterStartupScript(this, GetType(), "FromDateSample", "Noofdays();", true);
,我不得不在保存按钮上点击客户端事件。
=是赋值,==或===是比较 – mplungjan