Google I&#39幸运按钮 [英] Google I'm Feeling Lucky's button

查看:49
本文介绍了Google I&#39幸运按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始学习HTM1编码,所以我想通过再现 https://www来训练自己.google.com/页.因此,我添加了一些输入,以便用户进行研究.

I am new on learning HTMl coding, and I wanted to train my self by rproducing the https://www.google.com/ page. Thus, I've added inputs to let the user making is researches.

我要提供两种不同类型的重排结构(就像Google的页面一样).在第一个窗口中,点击"Google搜索"提交输入后,用户正在做经典研究.在第二个中,当用户单击我感到很幸运"时,提交输入后,用户将直接进入第一个链接,该链接可能会在Ser进行经典研究的情况下出现.

There are two different types of reshearches I want to provide (jus as like in the Google's page). In the first one, by clicking on the "Google Search" submit input, the user is doing a classic research. While in the second one, when the user clicks on the "I'm Feeling Lucky" submit input, the user is directly taken to the first link that would have appeared if the ser would have done a classic research.

但是问题在于,两个提交的输入都给了我经典研究",并且在该论坛以及其他论坛中寻找了很多答案之后,我仍然不明白为什么我的html代码没有不起作用:

But the problem is that both of the two submit inputs are giving me a "classic research"and after looking for many answers in this forum, and also other ones, I still don't understand why does my html code doesn't work:

<!DOCTYPE html>
<html lang="en">

    <head>
        <title>Google</title>
        <link rel="stylesheet" href="style.css">
        <link rel="shortcut icon" type="image/x-icon" href="google_logo.png">
    </head>
    <body>
        <div class="ends">
            <a id="left" href="ggimage.html">Google image</a>
            <a id="right" href="ggladvanced_search.html">Google advanced search</a>
        </div>
        <br><br><br><br><br><br><br><br>
        <div>
            <img src="google_search.PNG" alt="Google Search">
            <form action="https://google.com/search">
                <input type="text" name="q" placeholder="Enter your research">
                <div>    
                    <input id="right" name="btnK" type="submit" value="Google Search">
                    <p style="width: 10px;"></p>
                    <input id="left" name="btnI" type="submit" value="I'm Feeling Lucky"> 
                </div>
            </form>
        </div>
    </body>
</html>

我尝试使用按钮而不是提交输入,但是显示了相同的结果.

I tried to use buttons instead of submit inputs, but it is showing the same results.

推荐答案

问题是您未打开< input type ="text" ...> 标记.关闭它,您的表单应该可以正常工作.

The problem is that you left your <input type="text"...> tag open. Close it and your form should work as expected.

更改此:<输入类型=文本"名称="q"placeholder ="输入您的管理员">

对此:<输入类型=文本"名称="q"placeholder =输入您的研究"//gt;

这篇关于Google I&amp;#39幸运按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆