ASP.net button onserverclick only works when onclick isn't defined

前端 未结 5 1289
南旧
南旧 2020-12-01 22:40
    protected void btnNext_Click(object sender, EventArgs e)
    {
        btnNext.InnerHtml = \"CLICK\";
    }

    
5条回答
  •  暖寄归人
    2020-12-01 23:05

    try without 'return':
    Or if you wanted checkForm() to control whether to post or not - do like this:

    onclick="if (!checkForm()) return;"
    

提交回复
热议问题