Home >Web Front-end >HTML Tutorial >Problem with right-clicking the mouse to open a new window_html/css_WEB-ITnose

Problem with right-clicking the mouse to open a new window_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:24:321764browse

There is a navigation bar and iframe in page A. Clicking the link in the navigation bar displays page B in the iframe. However, when I right-click the mouse to open the navigation bar link in a new window, the page that pops up is just a separate page B. I The page you want to pop up is page B displayed in an iframe in page A. Can any brother help me? Thanks!


Reply to the discussion (solution)

Check the code on page B. If the page is not in an iframe, jump to page A and pass the current page identifier in the address bar parameter

Check the code on page B. If the page is not in an iframe, jump to page A and pass the current page identifier in the address bar parameter
However, the page will flash for a while and the experience is not good

A better approach is:
The link points to page A and the address bar parameter passes the address of page B of the link, so that when a new page opens, page A will be opened, and it is judged to load the corresponding page B
Then add an onclick event to the link , modify the src of the iframe, and return false, so that clicking the link page will not jump

Thank you, I am a novice, can you give me the code for reference? Thanks!

<frameset rows="64,*"  frameborder="NO" border="0" framespacing="0">	<frame src="index.html&id=000" noresize="noresize" frameborder="0" name="topFrame" scrolling="no" marginwidth="0" marginheight="0" target="main" />	<frameset cols="200,*"  rows="800,*" id="frame">	<frame src="index.html&id=001" name="leftFrame" noresize="noresize" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" target="main" />	<frame src="index.html&id=002" name="main" marginwidth="0" marginheight="0" frameborder="0" scrolling="auto" target="_self" />	</frameset></frameset>
It’s mainly a matter of name and target

I am using an iframe, can you give me the code for the iframe? I don't often use the framework given above, so I don't understand it a bit?
My navigation bar is outside the iframe.

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