是否可以a href在新选项卡中打开链接而不是相同的选项卡?
<a href="http://your_url_here.html">Link</a>
Run Code Online (Sandbox Code Playgroud) 什么之间的区别<a target="_new">,并<a target="_blank">和我应该使用如果我只是想打开一个新标签/窗口的链接?
我正在开发一个HTML项目,我无法找到如何在没有javascript的情况下在新选项卡中打开链接.
我已经知道<a href="http://www.WEBSITE_NAME.com"></a>在同一个标签中打开链接.有任何想法如何让它在新的开放?
我正在尝试打开一个新标签.但是Window.open()打开弹出窗口.
我想hello.php在新标签中打开文件.但它正在一个新的弹出窗口中打开.
<!DOCTYPE html>
<html>
<head>
<script language="javascript">
document.onmousedown=disableclick;
//status="Right Click Disabled";
function disableclick(event)
{
if(event.button==2)
{
//alert(status);
return false;
}
}
</script>
</head>
<body oncontextmenu="return false">
<form action="" method="POST" oncontextmenu="return false">
<b>Enter Username:</b><input type="text" name="username" value=""/><br>
<b>Enter Password: </b><input type="password" name="password" value=""/><br>
<input type="submit" value="submit" name="submit"/>
<input type="reset" value="reset" name="reset"/>
</form>
<?php
if (isset($_POST['submit']))
{
$username=$_POST['username'];
$password=$_POST['password'];
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("demo") or die(mysql_error());
$result=mysql_query("select * from employees where name='$username' and pass='$password'")
or die(mysql_error()); …Run Code Online (Sandbox Code Playgroud) 我有这个代码,在新窗口中打开我页面中的所有链接:
<base target='_new' />
Run Code Online (Sandbox Code Playgroud)
它在Chrome中运行良好,但在IE(8)和Firefox中并非如此.在Firefox中,它会打开一个新选项卡,但在第二个链接上单击它会在新选项卡中加载,但不会将此选项卡放在前面,因此用户必须手动单击新选项卡.在IE中,它会打开一个新的浏览器窗口.是否有在所有浏览器的新选项卡中打开的等效代码(..js/Jquery)?