本文介绍了此脚本的格式不正确的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
此脚本的格式不正确.它是第一次正常运行.之后便无法正常使用format.help me
This script is not working correct format.it is first time working correctly . after then not working correct format.help me
<asp:RadioButton ID="rdbCre" runat="server" CssClass="normalText" Text="Credit "
AutoPostBack="true" onclick="javascript:return hideloader()" />
< asp:TextBox ID ="txtAmount" runat ="server"/>
<asp:TextBox ID="txtAmount" runat="server" />
function hideloader() {
//$find('mpeLoader').show();
//document.getElementById('ctl00_cplhlderTransaction_rblCreBank_0').checked = false;
//document.getElementById('ctl00_cplhlderTransaction_rblCreBank_1').checked = false;
var lblAmountInfordo = document.getElementById("<%=Error.ClientID %>");
if (lblAmountInfordo != null) {
lblAmountInfordo.innerHTML = "";
}
var chktxtAmount = document.getElementById("<%=txtAmount.ClientID %>").value;
if (document.getElementById("<%=txtAmount.ClientID %>").value == "") {
if (chktxtAmount != null) {
document.getElementById("<%=txtAmount.ClientID %>").focus();
lblAmountInfordo.innerHTML = "Please Enter amount";
return false;
}
}
var chkminamt = document.getElementById("<%=txtAmount.ClientID %>").value;
if (document.getElementById("<%=txtAmount.ClientID %>").value < 5000) {
if (chkminamt != null) {
document.getElementById("<%=txtAmount.ClientID %>").focus();
lblAmountInfordo.innerHTML = "Amount Should be Minimum र 5000";
return false;
}
}
推荐答案
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript">
function hideloader() {
var lblAmountInfordo = document.getElementById("<%=Error.ClientID %>");
var chktxtAmount = document.getElementById("<%=txtAmount.ClientID %>").value;
if (lblAmountInfordo != null) {
lblAmountInfordo.innerHTML = "";
}
if (chktxtAmount == "") {
if (chktxtAmount != null) {
document.getElementById("<%=txtAmount.ClientID %>").focus();
lblAmountInfordo.innerHTML = "Please Enter amount";
return false;
}
}
if (chktxtAmount < 5000) {
if (chktxtAmount != null) {
document.getElementById("<%=txtAmount.ClientID %>").focus();
lblAmountInfordo.innerHTML = "Amount Should be Minimum र 5000";
return false;
}
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:textbox id="txtAmount" onblur="javascript:hideloader();" runat="server" />
<br /><hr />
<asp:radiobutton id="rdbCre" runat="server" cssclass="normalText" text="Credit " >
AutoPostBack="false" />
<br />
<asp:label id="Error" text="" runat="server"></asp:label>
</asp:radiobutton></div>
</form>
</body>
Vote or Accept solution
If this will help you
thanks
</html>
这篇关于此脚本的格式不正确的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!