當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


HTML <isindex>用法及代碼示例

<isindex>標記用於通過文本字段查詢任何文檔。表示此標簽通知瀏覽器用戶希望通過文檔提供搜索函數。如果要搜索較長文章中的任何特定單詞,則此標簽很有幫助。但是在這些日子裏,所有瀏覽器都通過按CTRL+F可以讓您搜索單詞,因此這些標簽如今已不再有用。

用法:

<isindex promt="search">

屬性:

  • prompt:此屬性包含一個字符串,該字符串是文本字段的標簽。
  • action:當您需要將查詢發送到其他URL時,此屬性保存URL。

注意:HTML5不支持<isindex>標記。例子:

<!Doctype html> 
<html> 
  
<head> 
    <title>HTML isindex Tag</title> 
    <isindex prompt="Search" /> 
    <style> 
        h1 { 
            color:green; 
        } 
    </style> 
</head> 
  
<body> 
    <center> 
        <h1>GeeksforGeeks</h1> 
        <h2>HTML <isindex> tag</h2> 
        <p> 
            Articles that need little modification/improvement 
        from reviewers are published first. To quickly get your 
        articles reviewed, please refer existing articles,  
        their formating style, coding style, and try to make 
        your close to them. 
        </p> 
    </center> 
</body> 
  
</html>                    

輸出: 得到搜索了單詞

支持的瀏覽器:HTML支持的瀏覽器| <isindex>標記在下麵列出:

  • 穀歌瀏覽器
  • IE瀏覽器
  • Firefox
  • Safari
  • Opera

相關用法


注:本文由純淨天空篩選整理自skyridetim大神的英文原創作品 HTML | <isindex> tag。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。