简体   繁体   English

JavaScript警告框

[英]JavaScript alertbox

Is there anyway of displaying a selectbox in an alert box of javascript. 无论如何,在javascript的警报框中显示选择框。 when user clicks an add button then alertbox must be displayed in which a selectbox (dropdown) must be shown with add button 当用户单击添加按钮时,必须显示警报框,其中必须使用添加按钮显示选择框(下拉列表)

您可能想研究类似jQuery UI模态对话框的东西,它们很容易设置。

Maybe this will do the trick: 也许这可以解决问题:

<input type="button" onclick="alert('message to pop up');" value="button text" />

The input type will define what controls will JavaScript define it as. 输入类型将定义JavaScript将其定义为哪些控件。 And the "OnClick" function will set the controls to what will happen next. 然后,“ OnClick”功能会将控件设置为接下来将要发生的事情。 In this case, an alertbox. 在这种情况下,是一个警报框。 The value will be the text displayed visually in the button. 该值将是按钮中可视显示的文本。 Hope this solved your answer. 希望这能解决您的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM