国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

純JavaScript基于notie.js插件實現消息提示特效

2019-11-20 10:46:31
字體:
來源:轉載
供稿:網友

本文實例介紹了純JavaScript實現消息提示特效是一款基于notie.js插件實現的可以制作Alert提示框,確認框和帶輸入的消息框,分享給大家供大家參考,具體內容如下

效果圖:

實現的代碼:
html代碼:

<br><br><br><br><br><br>  <article class="zzsc">    <div class="div-ext">      <div class="div-int">         <span>Test notie with these buttons:</span>        <br>        <button onclick="success();">Success</button>        <button onclick="warning();">Warning</button>        <button onclick="error();">Error</button><br>        <button onclick="info();">Information</button>        <button onclick="confirm();">Confirm</button>        <button onclick="input();">Input</button>        <br>        </div>    </div>  </article>

js代碼:

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);      });    }

希望本文所述對大家學習javascript程序設計有所幫助。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 庆阳市| 沁水县| 天镇县| 朔州市| 那曲县| 砀山县| 黄大仙区| 许昌市| 闽侯县| 龙南县| 鹤壁市| 漳州市| 齐齐哈尔市| 二连浩特市| 岱山县| 白银市| 湘潭市| 临夏县| 怀柔区| 莒南县| 同心县| 万源市| 女性| 新巴尔虎右旗| 武威市| 儋州市| 武定县| 乐陵市| 介休市| 岱山县| 修文县| 雅安市| 安图县| 南郑县| 成都市| 盐山县| 泗洪县| 巴南区| 旺苍县| 博白县| 山东省|