Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6586744
  • 博文数量: 227
  • 博客积分: 10047
  • 博客等级: 上将
  • 技术积分: 6678
  • 用 户 组: 普通用户
  • 注册时间: 2006-07-11 10:33
个人简介

网上的蜘蛛

文章分类

全部博文(227)

文章存档

2010年(19)

2009年(29)

2008年(179)

分类:

2008-04-25 22:24:56

 今天,发现一个不错的JavaScript,如果你厌倦了浏览器默认的alert提示框。那么你将会喜欢这个自定义的提示框。
 使用方法很简单:

<html xmlns="">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Custom JavaScript Dialog Boxes</title>
<link rel="stylesheet" type="text/css" href="dialog_box.css" />
<script type="text/javascript" src="dialog_box.js"></script>
</head>
........
  showDialog('Error','You have encountered an error.','error',2);
 
  showDialog('Warning','You must enter all required information.','warning')
 
  showDialog('Success','Your request has been successfully received.','success')
 
  showDialog('Confirmation','Are you sure you want to delete the entry?','prompt')
.......
</body>
</html>

相应的效果截图如下:

源代码下载地址:

原文链接:

Custom JavaScript Dialog Boxes

阅读(4411) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~