What is the correct way to open a form submit in a

2019-07-11 06:58发布

Normally I would us

<form target="_blank">

But looking through

http://www.w3schools.com/tags/tag_form.asp

I notice the target attribute is deprecated.

So what is the correct XHTML compliant way to perform such an action?

UPDATE: Thanks, I appreciate that opening new windows is not generally a good idea but in this case it's a third party linking to our site who wants this effect and unfortunately whilst I can suggest good design to them whether they take my advice is another matter :(

标签: html xhtml forms
1条回答
仙女界的扛把子
2楼-- · 2019-07-11 07:27

The target attribute is not deprecated (W3Schools is wrong again (and not the W3C)), it just doesn't appear in Strict.

If you want a new window from a form, then use the target attribute (and a Transitional doctype).

However, author triggered new windows are considered harmful.

查看更多
登录 后发表回答