Home  >  Article  >  Web Front-end  >  How to use a hyperlink in html to open a new window and control the properties of the window

How to use a hyperlink in html to open a new window and control the properties of the window

php中世界最好的语言
php中世界最好的语言Original
2018-01-25 11:17:063204browse

This time I will show you how to use html to open a new window using a hyperlink and control the properties of the window. How to use html to operate a hyperlink to open a new window and control the properties of the window. What are the precautions?, here are Let’s take a look at practical cases.

1. The size of the window opened by the html hyperlink

aaaaaaaaaaaaaaa

2. If there are many quotation marks in php, it is difficult to remove them. You can use the following methods:

$openNew="onclick=".'"'."javascript:window.open('host_graphics.php?host_id=$host_id&host_address=$host_address','','height=500,width=600,top=300,left=300,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')".'"'; echo " $host_name "; //主机名 点击可查看选中主机的具体信息

Tips:

onclick="javascript:window.open('12.php','','height=500,width=600,top=300,left=300,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')"

The file can be followed by the value of the variable, for example

host_graphics.php?host_id=$host_id&host_address=$host_address

, then you can use GET to obtain the value in the new window that pops up.

3. Example:

 
 
 
 
ThD 

aaaaaaaaaaaaaaa

I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!

Related reading:

How to implement an input drop-down menu in HTML

What should be the href attribute of a tag and the onclick event? Use

How to use Meta tag code to make 360 ​​Browser use speed mode to open web pages by default

The above is the detailed content of How to use a hyperlink in html to open a new window and control the properties of the window. For more information, please follow other related articles on the PHP Chinese website!

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