新闻建站cms系统、政府cms系统定制开发

广州网站建设公司-阅速公司

asp.net新闻发布系统、报纸数字报系统方案
/
http://www.ysneo.com/
广州网站建设公司
您当前位置:首页>ASP.NET MVC

ASP.NET MVC

RequiredFieldValidator与Attributes.Add冲突

发布时间:2009/8/5 15:52:28  作者:  阅读:877  

广告:阿里云采购优惠专区

this.Add.Attributes.Add("onclick", "return checkform(document.getElementById(\"eachpage3\").options[document.getElementById(\"eachpage3\").selectedIndex].value);");

前台:

function checkform(selvalue)
{
if (typeof(Page_ClientValidate) == 'function') {
if (Page_ClientValidate())
{
if(selvalue=="" || selvalue==null) {
alert("对不起,请选择版面!");
return false;
}
}
}
return true;

}

<asp:Button ID="Add" runat="server" Text="添加" Width="58px" CausesValidation="false" OnClick="Add_Click"></asp:Button>

Add加入: CausesValidation="false"

广告:阿里云新人采购专场

相关文章
RequiredFieldValidator与Attributes.Add冲突
cms新闻系统购买咨询
扫描关注 广州阅速软件科技有限公司
扫描关注 广州阅速科技