弹出提示/信息? [英] popup hints/information?

查看:94
本文介绍了弹出提示/信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站


在我的网站上(目前只处理基本结构,刚刚开始),有一个文本框供用户输入搜索条件或URL来搜索维基百科或谷歌,或转到他们输入的URL。有3个按钮 - 搜索维基百科,搜索谷歌和去!。


我以为人们可能会感到困惑,所以我打算在onMouseOver或onFocus上添加一条说明,内容如下:


" To搜索Wikipedia或Google - 输入搜索条件并单击相应的按钮。如果您想转到网址:输入您的条件,然后按''开始!''"


如何使用Javascript获取消息/指令,例如,在文本框下方悬停的框?


希望这是有道理的,


Sam

my website

In my website, (only working on basic structure so far, only just started) there is a text box for the user to enter a search Criteria or URL to search either Wikipedia or Google, or to go to the URL they inputted. There are 3 buttons - ''Search Wikipedia'', ''Search Google'' and ''Go!''.

I was thinking people might get confused so I intended to add an instruction on either onMouseOver or onFocus, which reads:

"To search Wikipedia or Google - enter your search criteria and click the corresponding button. If you wish to go to a URL: enter your criteria and Press ''Go!'' "

How, using Javascript, would I get the message/instruction to appear, in say, a box hovering underneath the textbox?

Hope that made sense,

Sam

推荐答案

你想要一个浮动框(如工具提示)或只是出现的东西在框下方作为页面的一部分?


创建一个div并将其顶部位置设置为文本框的顶部+文本框的高度及其左侧位置相同文本框。通过将visibility属性设置为hidden来隐藏它。通过将style.visibility属性设置为visible来显示该框。
Do you want a floating box (like a tooltip) or just something which appears underneath the box as part of the page?

Create a div and set its top position to be the top of text box + the height of the text box and its left position the same as the text box. Hide it by setting the visibility property as "hidden". Show the box by setting the style.visibility property to "visible".



您想要一个浮动框(如工具提示)或者只是作为页面一部分显示在框下面的东西?


创建一个div并将其顶部位置设置为文本框的顶部+文本框的高度及其左侧位置与文本框相同。通过将visibility属性设置为hidden来隐藏它。通过将style.visibility属性设置为visible来显示该框。
Do you want a floating box (like a tooltip) or just something which appears underneath the box as part of the page?

Create a div and set its top position to be the top of text box + the height of the text box and its left position the same as the text box. Hide it by setting the visibility property as "hidden". Show the box by setting the style.visibility property to "visible".



我尝试使用div,它只隐藏了div中的文本; div本身(概述)始终存在。应该是这样的吗?


我怎么做浮箱? div可见性方式?


Sam

I tried that with a div, it only hid the text in the div; the div itself (outline of) remained throughout. Should that be the case?

How would I do it as a floating box? The div visibility way?

Sam


将头寸设置为绝对如果您不希望它成为页面的固定部分。


显示您尝试过的代码。
Set the position to be "absolute" if you don''t want it to be a fixed part of the page.

Show the code that you tried.


这篇关于弹出提示/信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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