JavaScript 個性彈窗:ctmessage
tmessage 是 JavaScript 個性彈窗,提供了alert、confirm和message的實現。
如何使用:
引入js和css文件
調用下面代碼實現一個基本的alert框
ct.alert({
text: "hello world",
type: "alert"
});
調用方法
ct.message({type, text, title, position, expire, callback})
type是彈出框類型:
alert alert-error
confirm confirm-error
info info
title 標題文本
text 提示內容
position type為info時 信息框對應的位置 top在頂部 bottom在底部
expire 信息框存活周期 type為info才有用
callback(result) 關閉窗口后的回調函數
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!