search
HomeWeb Front-endHTML Tutorial密码修改不了_html/css_WEB-ITnose

	<div id="tab_3-3" class="tab-pane ">	<div style="height: auto;" id="accordion3-3" class="accordion collapse">		<form action="#">				<label class="control-label">当前密码</label>                             <asp:TextBox ID="Cur_Pas" runat="server" CssClass="m-wrap span8"></asp:TextBox>                                <label class="control-label">新的密码</label>                             <asp:TextBox ID="New_Pas" runat="server" CssClass="m-wrap span8"></asp:TextBox>                                 <label class="control-label">再次输入</label>                               <asp:TextBox ID="Input_Again" runat="server" CssClass="m-wrap span8"></asp:TextBox>                     <div class="submit-btn">                     <asp:Button ID="Pas_Change" runat="server"   onclick="Pas_Change_Click" Text="修改密码" CssClass="btn green"  />                    <asp:Button ID="Button2" runat="server" Text="取消" CssClass="btn green"/>																</div>															</form>														</div>													</div>

代码如上,点击修改密码时并不会调用修改密码那个函数,所以觉得是前台这里有问题,刚开始学习,可能对大神们来说有点简单,知道的可以讲一下吗,谢谢


回复讨论(解决方案)

.net不会,试试吧

<asp:Button ID="Pas_Change" runat="server"   onclick="Pas_Change_Click()" Text="修改密码" CssClass="btn green"  />

.net不会,试试吧

<asp:Button ID="Pas_Change" runat="server"   onclick="Pas_Change_Click()" Text="修改密码" CssClass="btn green"  />


我就是在.net上做的,修改不了

Pas_Change_Click方法看一下

Pas_Change_Click方法看一下


   protected void Pas_Change_Click(object sender, EventArgs e)
    {
        if (Cur_Pas.Text == teacher.password)
        {
            if (New_Pas.Text == Input_Again.Text)
            {
                teacher.password = New_Pas.Text;
                if (bllteacher.Update(teacher) == 1)
                {
                    ClassJs.Alert("修改密码成功!", this);
                }
                else
                {
                    ClassJs.Alert("密码修改失败,请重新输入!", this);
                }
            }
            else
            {
                ClassJs.Alert("您两次输入的新密码不相同,请重新输入!", this);
            }
        }
        else
        {
            ClassJs.Alert("您输入的密码错误,请重新输入", this);
        }
    }
感觉不是这里出错,因为这个方法感觉没掉用,设断点也没用


Pas_Change_Click方法看一下


   protected void Pas_Change_Click(object sender, EventArgs e)
    {
        if (Cur_Pas.Text == teacher.password)
        {
            if (New_Pas.Text == Input_Again.Text)
            {
                teacher.password = New_Pas.Text;
                if (bllteacher.Update(teacher) == 1)
                {
                    ClassJs.Alert("修改密码成功!", this);
                }
                else
                {
                    ClassJs.Alert("密码修改失败,请重新输入!", this);
                }
            }
            else
            {
                ClassJs.Alert("您两次输入的新密码不相同,请重新输入!", this);
            }
        }
        else
        {
            ClassJs.Alert("您输入的密码错误,请重新输入", this);
        }
    }
感觉不是这里出错,因为这个方法感觉没掉用,设断点也没用
 去掉试试



Pas_Change_Click方法看一下


   protected void Pas_Change_Click(object sender, EventArgs e)
    {
        if (Cur_Pas.Text == teacher.password)
        {
            if (New_Pas.Text == Input_Again.Text)
            {
                teacher.password = New_Pas.Text;
                if (bllteacher.Update(teacher) == 1)
                {
                    ClassJs.Alert("修改密码成功!", this);
                }
                else
                {
                    ClassJs.Alert("密码修改失败,请重新输入!", this);
                }
            }
            else
            {
                ClassJs.Alert("您两次输入的新密码不相同,请重新输入!", this);
            }
        }
        else
        {
            ClassJs.Alert("您输入的密码错误,请重新输入", this);
        }
    }
感觉不是这里出错,因为这个方法感觉没掉用,设断点也没用
 去掉试试
不管用,为什么要去掉这个

<form action="#"></form>换成<form id="from1" runat="server"></form>

<form action="#"></form>换成<form id="from1" runat="server"></form>


不是这里的问题,#表示提交表单到本页,
这句在母版页是有的,所以改了会出错

大神们帮帮忙,加到100分了

你这本来就是响应的后台事件,如果没进后台事件,你看看是不是名称不对

点击事件函数都没进去,说明这个按钮没有触发这个事件吧,感觉是语法的问题,你自己单独写个简单的测试页面,试试这个onclick事件能否进去,如果可以,我想是你上面这个页面哪里漏掉了什么

你这本来就是响应的后台事件,如果没进后台事件,你看看是不是名称不对


名称是对的呀,我代码上面您看一下。不是名称的问题

点击事件函数都没进去,说明这个按钮没有触发这个事件吧,感觉是语法的问题,你自己单独写个简单的测试页面,试试这个onclick事件能否进去,如果可以,我想是你上面这个页面哪里漏掉了什么


就是点击按钮触发不了后台的事件呀,就是在找这个原因呀


这个是什么问题


这个是什么问题


买本书 或者弄个教程视频完整看下
你这样问真的能学会?
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
HTML as a Markup Language: Its Function and PurposeHTML as a Markup Language: Its Function and PurposeApr 22, 2025 am 12:02 AM

The function of HTML is to define the structure and content of a web page, and its purpose is to provide a standardized way to display information. 1) HTML organizes various parts of the web page through tags and attributes, such as titles and paragraphs. 2) It supports the separation of content and performance and improves maintenance efficiency. 3) HTML is extensible, allowing custom tags to enhance SEO.

The Future of HTML, CSS, and JavaScript: Web Development TrendsThe Future of HTML, CSS, and JavaScript: Web Development TrendsApr 19, 2025 am 12:02 AM

The future trends of HTML are semantics and web components, the future trends of CSS are CSS-in-JS and CSSHoudini, and the future trends of JavaScript are WebAssembly and Serverless. 1. HTML semantics improve accessibility and SEO effects, and Web components improve development efficiency, but attention should be paid to browser compatibility. 2. CSS-in-JS enhances style management flexibility but may increase file size. CSSHoudini allows direct operation of CSS rendering. 3.WebAssembly optimizes browser application performance but has a steep learning curve, and Serverless simplifies development but requires optimization of cold start problems.

HTML: The Structure, CSS: The Style, JavaScript: The BehaviorHTML: The Structure, CSS: The Style, JavaScript: The BehaviorApr 18, 2025 am 12:09 AM

The roles of HTML, CSS and JavaScript in web development are: 1. HTML defines the web page structure, 2. CSS controls the web page style, and 3. JavaScript adds dynamic behavior. Together, they build the framework, aesthetics and interactivity of modern websites.

The Future of HTML: Evolution and Trends in Web DesignThe Future of HTML: Evolution and Trends in Web DesignApr 17, 2025 am 12:12 AM

The future of HTML is full of infinite possibilities. 1) New features and standards will include more semantic tags and the popularity of WebComponents. 2) The web design trend will continue to develop towards responsive and accessible design. 3) Performance optimization will improve the user experience through responsive image loading and lazy loading technologies.

HTML vs. CSS vs. JavaScript: A Comparative OverviewHTML vs. CSS vs. JavaScript: A Comparative OverviewApr 16, 2025 am 12:04 AM

The roles of HTML, CSS and JavaScript in web development are: HTML is responsible for content structure, CSS is responsible for style, and JavaScript is responsible for dynamic behavior. 1. HTML defines the web page structure and content through tags to ensure semantics. 2. CSS controls the web page style through selectors and attributes to make it beautiful and easy to read. 3. JavaScript controls web page behavior through scripts to achieve dynamic and interactive functions.

HTML: Is It a Programming Language or Something Else?HTML: Is It a Programming Language or Something Else?Apr 15, 2025 am 12:13 AM

HTMLisnotaprogramminglanguage;itisamarkuplanguage.1)HTMLstructuresandformatswebcontentusingtags.2)ItworkswithCSSforstylingandJavaScriptforinteractivity,enhancingwebdevelopment.

HTML: Building the Structure of Web PagesHTML: Building the Structure of Web PagesApr 14, 2025 am 12:14 AM

HTML is the cornerstone of building web page structure. 1. HTML defines the content structure and semantics, and uses, etc. tags. 2. Provide semantic markers, such as, etc., to improve SEO effect. 3. To realize user interaction through tags, pay attention to form verification. 4. Use advanced elements such as, combined with JavaScript to achieve dynamic effects. 5. Common errors include unclosed labels and unquoted attribute values, and verification tools are required. 6. Optimization strategies include reducing HTTP requests, compressing HTML, using semantic tags, etc.

From Text to Websites: The Power of HTMLFrom Text to Websites: The Power of HTMLApr 13, 2025 am 12:07 AM

HTML is a language used to build web pages, defining web page structure and content through tags and attributes. 1) HTML organizes document structure through tags, such as,. 2) The browser parses HTML to build the DOM and renders the web page. 3) New features of HTML5, such as, enhance multimedia functions. 4) Common errors include unclosed labels and unquoted attribute values. 5) Optimization suggestions include using semantic tags and reducing file size.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor