userName = window.prompt("请输入你的名字","张三");
解决方案 »
- 请教关于for 的问题!
- var table = new Dytable({});
- 请问如何判断checkbox被选中
- 制作一个可伸缩的大小分类列表,做了能伸开了,但怎么样才能收回呢?
- 就10分了,请多指教
- 在javascript中读到的值,如何在vbscript中调用
- document.all and document.layers ?????????
- 如何判断用户触发了F5键或者用右键刷新页面?
- 关于Iframe
- #################Ext.js 怎么设置文本框不可编辑 #########
- 窗口的关闭
- 谁自己做过select控件,因为确省的select太讨厌,老是在所有层的上方!
则变量userinput为用户输入的数据(字符型,不是数值型)。第一个参数是输入框上的提示信息,第二个参数是默认的输入值,可以为空。
prompt("Please enter your msg!","default");
</script>
要想去掉“javascript对象提示”,只有用 showModalDialog 了,更麻烦,而且还会有别的提示
confirm("这是一个含有'确定'和'取消'的提示框,不知是不是你要的。");
</script>
promtp("你要输入的内容")
</script>
object.prompt([message [, inputDefault]])Parameter Description
message Optional. (String) String to display.
inputDefault Optional. (String) String or integer that represents the default value of the input field. Return ValueReturns the value that the user types in. ResIf the inputDefault parameter is not supplied, the dialog box displays the value <undefined>. You have no control over the title of the prompt box. Applies Towindow