警示框+输入框+确认框
来源:互联网 发布:古筝考级教材知乎 编辑:程序博客网 时间:2024/04/30 16:06
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>js</title>
<!--
BOM
browser object meodel 浏览器对象模型
操作浏览器里面的功能。
window
alert()警示框
prompt() 输入框
confirm() 确认框
history 了解
前进 、下一页
后退
刷新
location
定位
-->
</head>
<body>
<input type="button" id="id0" value="警示框" onclick="fangfa1()"/>
<input type="button" id="id0" value="输入框" onclick="fangfa2()"/>
<input type="button" id="id0" value="确认框" onclick="fangfa3()"/>
<hr />
<input type="button" id="id1" value="前进" onclick="fangfa4()"/>
<input type="button" id="id2" value="后退" onclick="fangfa5()"/>
<input type="button" id="id3" value="刷新" onclick="fangfa6()"/>
<a href="http://baidu.com">百度一下</a>
<a href="demo.html">京东</a>
<hr />
<input type="button" id="id4" value="定位" onclick="fangfa7()" />
<script type="text/javascript">
function fangfa1(){
alert("hello 外面好冷");
}
function fangfa2(){
//作用:获取用户的输入信息
var qiu = prompt("请输入你喜欢的球类运动...");
console.log(qiu+"----")
}
function fangfa3(){
var a = confirm("确认删除吗?");
console.log("---"+a);
if (a) {
//删除
}else{
//
}
}
function fangfa4(){
history.go(1);
// history.forward();
}
function fangfa6(){
history.go(0);
// history.refresh(); 不存在
}
function fangfa7(){
location.href="http://www.livecoding.tv";
}
</script>
</body>
</html>
<html>
<head>
<meta charset="utf-8" />
<title>js</title>
<!--
BOM
browser object meodel 浏览器对象模型
操作浏览器里面的功能。
window
alert()警示框
prompt() 输入框
confirm() 确认框
history 了解
前进 、下一页
后退
刷新
location
定位
-->
</head>
<body>
<input type="button" id="id0" value="警示框" onclick="fangfa1()"/>
<input type="button" id="id0" value="输入框" onclick="fangfa2()"/>
<input type="button" id="id0" value="确认框" onclick="fangfa3()"/>
<hr />
<input type="button" id="id1" value="前进" onclick="fangfa4()"/>
<input type="button" id="id2" value="后退" onclick="fangfa5()"/>
<input type="button" id="id3" value="刷新" onclick="fangfa6()"/>
<a href="http://baidu.com">百度一下</a>
<a href="demo.html">京东</a>
<hr />
<input type="button" id="id4" value="定位" onclick="fangfa7()" />
<script type="text/javascript">
function fangfa1(){
alert("hello 外面好冷");
}
function fangfa2(){
//作用:获取用户的输入信息
var qiu = prompt("请输入你喜欢的球类运动...");
console.log(qiu+"----")
}
function fangfa3(){
var a = confirm("确认删除吗?");
console.log("---"+a);
if (a) {
//删除
}else{
//
}
}
function fangfa4(){
history.go(1);
// history.forward();
}
function fangfa6(){
history.go(0);
// history.refresh(); 不存在
}
function fangfa7(){
location.href="http://www.livecoding.tv";
}
</script>
</body>
</html>
阅读全文
0 0
- 警示框+输入框+确认框
- css与js 输入,确认和警示框以及网页的前进后退
- 警示框
- 警示框
- bootstrap警示框
- Bootstrap 警示框
- Android-AlertView(警示框)
- 仿安卓 警示框 悬浮框
- 密码输入框,确认密码输入框不能复制粘贴
- 确认框
- 创建CSS3警示框渐变动画
- iOS个人整理17-警示框--UIAlertController
- 自定义延时消失的警示框
- 统一iOS里的警示框
- 密码输入框,确认密码输入框不能复制粘贴-----点击事件阻止
- 删除确认框
- 链接确认提示框
- JavaScript 多次确认框
- 当前日期
- jzoj3542 【清华集训2014】冒泡排序 (又是性质+半构造)
- Lintcode 2. 尾部的零
- 侧滑销毁activity
- 调用play的jpa查询数据时添加Transformers.ALIAS_TO_ENTITY_MAP可将结果集封装到list<map>对象里
- 警示框+输入框+确认框
- 折线分割平面(递推+数学)
- CTS测试框架 -- 基础框架Trade-Federation
- hdu 1007 Quoit Design(借鉴大神,求解平面对点)
- 解决:UnicodeDecodeError:'ascii' codec can't.......
- 图片跟随鼠标移动(期间鼠标不释放)以及释放鼠标(图片)时刻鼠标位置
- Android开发之漫漫长途 番外篇——自定义View的各种姿势2
- 服务器管理——SSH远程会话管理工具screen
- 使用FileUpload实现Servlet的文件上传