admin管理员组文章数量:1391995
What is target="_new"
? Validator is raising an error..
How do you do this with jquery because Validator is raising an error.
On the same page, I have target="_new"
and target="_blank"
. target="_new"
is in that form code which i received from email newsletter pany.
I'm using this for target="_blank"
$(function() {
$('a[href^=http]').click( function() {
window.open(this.href);
return false;
});
});
What should i do for target="_new"
Update: 1 min Ago
upon clicking on submit button i want to open a page in new window to pass validation how to do this in jquery as i'm doing for other external link.
update:
this is code
<form method="post" class="form-wrapper" action=".php">
What is target="_new"
? Validator is raising an error..
How do you do this with jquery because Validator is raising an error.
On the same page, I have target="_new"
and target="_blank"
. target="_new"
is in that form code which i received from email newsletter pany.
I'm using this for target="_blank"
$(function() {
$('a[href^=http]').click( function() {
window.open(this.href);
return false;
});
});
What should i do for target="_new"
Update: 1 min Ago
upon clicking on submit button i want to open a page in new window to pass validation how to do this in jquery as i'm doing for other external link.
update:
this is code
<form method="post" class="form-wrapper" action="http://sitename./form.php">
Share
Improve this question
edited Mar 20, 2010 at 2:48
Jitendra Vyas
asked Mar 17, 2010 at 4:01
Jitendra VyasJitendra Vyas
153k240 gold badges587 silver badges868 bronze badges
3 Answers
Reset to default 9There is no such thing as target="_new"
. Using this will simply open the link in a new window called "_new". You might notice that clicking on a link with target="_new" will open a new window (or tab) but then a second link will open in the same window (or tab), rather than opening a second one as you'd probably expect.
Personally, I don't think you should be specifying target="_blank"
at all - let the user choose.
target="_blank" is invalid in XHTML (actually, the entire target attribute is invalid). If you want a link to open in a new window (usually a bad idea, in my opinion) and validation is important to you, the only way to do it is with javascript (like you did).
This is an attribute for a(anchor) tag, which let you open the page on the same window or in a new window.
本文标签: javascriptWhat is targetquotnewquot validator giving errorStack Overflow
版权声明:本文标题:javascript - What is target="_new"? validator giving error - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744768306a2624180.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论