Home >Web Front-end >HTML Tutorial >html: Can there be a tag in option tag?

html: Can there be a tag in option tag?

黄舟
黄舟Original
2017-07-03 10:22:194570browse

html: Can there be a tag in the option tag?

<select onchange="window.location=this.value">
    <option value="链接">1</option>
    <option value="链接">1</option>
    <option value="链接">1</option>
</select>

Your purpose is to jump to the page

1: Jump to the page

<select onchange="window.location=this.value">
    <option value="链接">1</option>
    <option value="链接">1</option>
    <option value="链接">1</option>
</select>

2: JumpAnchor

<select onchange="window.location.href=this.value">
    <option value="链接">1</option>
    <option value="链接">1</option>
    <option value="链接">1</option>
</select>

The above is the detailed content of html: Can there be a tag in option tag?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn