Window. open code that defines how a window is opened

Source: Internet
Author: User

Window. open is often used in webpage development. How can we define the window opening method, such as hyperlink, button, and new window opening?

Below are some examples of code, which are not technical enough for your convenience.

It is easy to open the current window. to open it in a new window, change self in the following code to _ blank or new

<A onClick = "window. open ('"http://www.bkjia.com"', '_ self', 'rollbars = no, resizable = no, width = 641, height = 480, top = 50, left = 50 ') "> fire school </a>
<A href = javascript: window. open ('"http://www.bkjia.com"', '_ self', '')> fire school </a>
<Button onclick = window. open ('"http://www.bkjia.com"', '_ self', '')> fire school </button>
<A href = "http://www.bkjia.com" onclick = "window. open ('" http://www.bkjia.com "', '_ self',''); return false "> fire school </a>

Related Article

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.