<script>
function myinput()
{
myvalue=prompt("pls enter a value:");
alert(myvalue);
}
</script>
<input type=button onclick=myinput()>
function myinput()
{
myvalue=prompt("pls enter a value:");
alert(myvalue);
}
</script>
<input type=button onclick=myinput()>
解决方案 »
- js 根据打印机名字来打印.分配各自的工作.
- 参数传递问题,新手求解答!先谢谢了!
- js在ie中正常,但在firefox中没反应,谢谢!
- jsp页面为什么出现空指针错误
- ***如何使复选框中至少有1项是选中的***急~~~谢谢高手帮忙!
- 我们js区居然没有实现文本分页的帖子???恭请高手解决!来者有分!
- 屏敝 f5刷新问题?
- 这段程序错在哪里?
- 高分奉送,select标签指定了multiple属性,用javascript怎样得到所选的每一项呢?
- 请 秋水无恨 来帮忙,关于showModalDialog中的后退
- 高分求解,用JAVASCRIPT能实现搜索引擎功能吗?
- 在什么时候设ActiveX的属性?
<body>
<input type=button value="Enter Value" onclick="myinput();" >
</body><script language="javascript">
function myinput()
{
var input=prompt("Please enter a value:");
//be careful, whatever user input, javascript will treat it as a
//"string", if you need a number, you need to use "parseInt()"
//method to change String to Number. like the following:
//var b=parseInt(input) +1;
//alert(b);
alert("You just entered: " + input);
}
</script>
</html>