【问题标题】:why does the google image link throw me to google search为什么谷歌图片链接让我进入谷歌搜索
【发布时间】:2021-02-06 00:17:15
【问题描述】:

我正在编写一个简短的 HTML 代码,它可以让我们在 google 图像中进行研究。但问题是它总是让我们进入谷歌搜索,我不明白为什么。 这是我的代码:

<!DOCTYPE html>
<html lang="en">
    <head>
        <title>Search</title>
        <link rel="stylesheet" href="style.css">
    </head>
    <body>
        <a id="right" href="ggsearch.html">Google search</p></a>
        <div></div>
        <br><br><br><br><br><br>
        <form action="https://images.google.com/search">
            <input type="text" name="q" placeholder="The image you are looking for">
            <input type="submit" value="Google Image">
        </form>
    </body>
</html>

CSS 代码在另一个文件中,它只是放置文本。

【问题讨论】:

    标签: html forms hyperlink


    【解决方案1】:

    将您的表单操作更改为http://images.google.com/images

    <!DOCTYPE html>
    <html lang="en">
        <head>
            <title>Search</title>
            <link rel="stylesheet" href="style.css">
        </head>
        <body>
            <a id="right" href="ggsearch.html">Google search</a>
            <div></div>
            <br><br><br><br><br><br>
            <form action="http://images.google.com/images">
                <input type="text" name="q" placeholder="The image you are looking for">
                <input type="submit" value="Google Image">
            </form>
        </body>
    </html>

    希望这有帮助:)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-07-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-14
      相关资源
      最近更新 更多