Implemented on a page in the click-button closure page

Source: Internet
Author: User
Tags closure html page implement window
Button | PAGE

The ASPX page to implement the click of a button (server-side control) to shut off the current page, only need to ASPX page in the page_load () method to add the following statement:

This. btnclose. attributes. add ("onclick", "window. close () "); // btnclose is button name

This statement is to add a click Properties, called window. Close () method.

2> HTML page to implement the click of a button (HTML Control) to shut off the current page, just need the HTML code of the button control in the code to add a onclick attribute, the Code is as follows:

<INPUT id = "Button1" type = "button" value = "Button" name =" button1 "onclick =" window. close>



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.