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.