javascript 使用javascript中的下拉框创建提示输入对话框?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3732703/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 02:04:39  来源:igfitidea点击:

Create prompt input dialog with dropdown box in javascript?

javascriptdialog

提问by Jin Yong

Does anyone know how can I create a prompt input dialog with dropdown box in javascript?

有谁知道如何在javascript中创建带有下拉框的提示输入对话框?

Example:

例子:

alt text

替代文字

回答by JKirchartz

I don't think this is possible, you're probably going to have to use a modal box of some sort. Check out jQuery UI's modal box at http://jqueryui.com/demos/dialog/

我认为这是不可能的,您可能将不得不使用某种模态框。在http://jqueryui.com/demos/dialog/查看 jQuery UI 的模式框

回答by Boushley

Ya, you're probably going to have to settle for a modal... although you could style it to look pretty much the same. Although it would be limited to being within the parent window. But if you're ok with that, use a modal (jQuery's or whatever) and then just style it to look like what you're going for.

是的,您可能不得不接受模态……尽管您可以将其样式设置为看起来几乎相同。虽然它会被限制在父窗口内。但是,如果您对此感到满意,请使用模态(jQuery 或其他),然后将其设置为您想要的样式。

回答by Rakesh Juyal

Unfortunately you can not have an input dialog box like that. You will have to settle for a modal dialog box which can use styling.
Have a look at these example:
http://dev.iceburg.net/jquery/jqModal/#examples

不幸的是,您不能拥有这样的输入对话框。您将不得不接受一个可以使用样式的模式对话框。
看看这些例子:http:
//dev.iceburg.net/jquery/jqModal/#examples