问题
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 :(
回答1:
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.
来源:https://stackoverflow.com/questions/2801230/what-is-the-correct-way-to-open-a-form-submit-in-a-new-window-now-target-is-depr