Js allows you to browse images in the same window and js window images.

Source: Internet
Author: User

Js allows you to browse images in the same window and js window images.

There are many ways to browse images in the same window. In this example, we will introduce how to use js to get the src attribute of img and then replace it. If you need it, refer

<! DOCTYPE html PUBLIC "-// W3C // dtd html 4.01 Transitional // EN" "http://www.w3.org/TR/html4/loose.dtd"> 

How to Use JS to control a window with the same path in the same browser can only open one

Opening a new window in JS will be blocked by some browsers.

It can be implemented in other ways, depending on your needs.

For example, a floating layer can pop up to replace the window.


How can I use javascript to display images in a new window?

What is it like? If you open a new window and show the image when loading the new window, call javascript to call an image control. The chef attribute is "display = none" and is hidden there. When loading a window, set the attribute to display = block. This is the case.

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.