js里三种弹框
来源:互联网 发布:照片审核工具 mac 编辑:程序博客网 时间:2024/05/29 15:54
1.警告框
<html>
<head>
<script type="text/javascript">
function disp_alert()
{
alert("我是警告框!!")
}
</script>
</head>
<body>
<input type="button"onclick="disp_alert()"value="显示警告框"/>
</body>
</html>
2.确定取消框
<html>
<head>
<script type="text/javascript">
function disp_confirm()
{
var r=confirm("按下按钮")
if (r==true)
{
document.write("您按了确认!")
}
else
{
document.write("您按了取消!")
}
}
</script>
</head>
<body>
<input type="button"onclick="disp_confirm()"value="显示确认框"/>
</body>
</html>
3.有输入的框
<html>
<head>
<script type="text/javascript">
function disp_prompt()
{
var name=prompt("请输入您的名字","Bill Gates")
if (name!=null && name!="")
{
document.write("你好!"+ name + " 今天过得怎么样?")
}
}
</script>
</head>
<body>
<input type="button"onclick="disp_prompt()"value="显示提示框"/>
</body>
</html>
- js里三种弹框
- js
- js
- JS
- JS
- JS
- js
- js
- js
- js
- js
- JS
- js
- JS
- js
- js
- js
- js
- COM连接点 - Part II - 最简单的例子 (1)
- epoll详解
- Linux 安装双版本jdk(2)rpm -ivh or -Uvh?
- 一个生产者与消费者的简单编程案例
- COM连接点 - Part III - 一个COM接口实现多个连接点
- js里三种弹框
- 部署xtrabckup备份_附带shell增量脚本
- 经典PV问题系列一:解决互斥
- ubuntu android 开发环境配置
- COM连接点 - Part IV - IDL里面一定需要增加新的事件吗?
- 高并发的epoll+线程池,epoll在线程池内 2011
- COM连接点 - Part V - CComDynamicUnkArray::Add问题
- OpenGL进阶(四)-用参数方程绘制椭球体
- Linux Epoll介绍和程序实例