引入
<link rel="stylesheet" type="text/css" href="css/default.css">
在<body>中插入
< script > function success() { notie.alert(1, 'Success!', 2); } function warning() { notie.alert(2, 'Warning<br><b>with</b><br><i>HTML</i><br><u>included.</u>', 2); } function error() { notie.alert(3, 'Error.', 2); } function info() { notie.alert(4, 'Information.', 2); } function confirm() { notie.confirm('Are you sure you want to do that?<br><b>That\'s a bold move...</b>', 'Yes', 'Cancel', function() { notie.alert(1, 'Good choice!', 2); }); } function input() { notie.input('Please enter your email address:', 'Submit', 'Cancel', 'email', 'name@example.com', function(value_entered) { notie.alert(1, 'You entered: ' + value_entered, 2); }); } < /script>
<!-- JavaScript -->
<script src="js/notie.js"></script>