2016-08-16 45 views
0

我一直试图让搜索结果在新窗口打开几个小时,但没有运气。我究竟做错了什么?如何在新窗口中打开搜索结果?

<form id="tfnewsearch" method="get" action="http://www.maps.google.com" target="_blank"> 
    <input type="text" class="tftextinput" name="q" size="21" maxlength="120">  
    <input type="submit" value="search" class="tfbutton"> 
</form> 

编辑:添加CSS这里

#tfnewsearch{ 
    float:right; 
    padding:20px; 
} 
.tftextinput{ 
    margin: 0; 
    padding: 5px 15px; 
    font-family: Arial, Helvetica, sans-serif; 
    font-size:14px; 
} 
.tfbutton { 
    margin: 0; 
    padding: 5px 15px; 
    font-family: Arial, Helvetica, sans-serif; 
    font-size:14px; 
    outline: none; 
    cursor: pointer; 
    text-align: center; 
    text-decoration: none; 
    color: #ffffff; 
} 
.tfbutton:hover { 
    text-decoration: none; 

} 
/* Fixes submit button height problem in Firefox */ 
.tfbutton::-moz-focus-inner { 
    border: 0; 
} 

任何人说看到有什么不对?

+0

新窗口或新标签页? – Shank

+0

'_blank'似乎只在最新的浏览器中打开新标签页 – Shank

回答

0

你做得对。我已经复制并粘贴了你的代码并测试了它,它工作正常,请检查你的css clases,或者你没有遗漏任何要关闭的标签

+0

我什么都看不到,也许我现在只是盲目地为它主演了几个小时。在问题中添加了CSS代码 – anita

相关问题