【发布时间】:2021-03-26 15:21:31
【问题描述】:
新手学习者在这里学习 HTML!表单的前两个按钮有效(Google 和 Bing),但是当我点击尝试尝试在 YouTube 上搜索相同的东西时,点击提交按钮后没有任何反应。有什么线索吗?我也尝试将操作链接更改为
https://www.youtube.com/results?search_query
但同样的问题也会发生。
这是我的代码:
<p>
<!-- this form searched Google again with q query and name -->
<form action="https://www.google.com/search?q=">
<input type="text" name="q">
<button> Search Google here </button>
</form>
</p>
<p>
<!-- this form searched Bing again with q query and name -->
<form action="https://www.bing.com/search?q=">
<input type="text" name="q">
<button> Search Bing here </button>
</form>
</p>
<p>
<!-- this form searched Youtube again with q query and name -->
<form action="hhttps://www.youtube.com/results">
<input type="text" name="search_query">
<button> Search YouTube here </button>
</form>
</p>
【问题讨论】:
-
您是否注意到在您的 Youtube 表单的
action属性中您有hhttps(而不是https)?我测试了,这就是错误。