target=_blank not work

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kevinsir
    New Member
    • Jul 2010
    • 1

    #1

    target=_blank not work

    hey guys;
    I have a problom.
    when I set something just like 'before all' before html head '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"' target=_blank in head not work,but when i delete 'before all' it works;
    That's the code.
    Code:
    before all
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
        <title>dsasad</title>
         <base target=_blank />
    </head>
    <body>
    <p>
    <a href="http://opensuse.javaeye.com"> the link</a>
     </p>
    
    </body>
    </html>
    the link not open in new window
    if i drop 'before all '

    the link open in new windos

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
        <title>dsasad</title>
         <base target=_blank />
    </head>
    <body>
    <p>
    <a href="http://opensuse.javaeye.com"> the link</a>
     </p>
    
    </body>
    </html>
    Well, who can tell me the reason?
    More, I test it in IE8.0
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    Nothing is to be before the doctype. It throws IE into quirks mode. That shouldn't affect the link, however.

    Comment

    Working...