原生javascript彈層彈窗插件Xtiper使用

  只需要吧jq和css存到目標路徑下

簡單消息通知

xtip.alert('成功','s')

  1. <button class="xbutton" οnclick="xtip.alert('通知')">通知</button>
  2. <button class="xbutton" οnclick="xtip.alert('3秒後自動消失','e',{times:3,title:'Are you sure?',btn:'Sure'})">3秒後自動消失</button>
  3. <button class="xbutton" οnclick="xtip.alert('無遮罩','w',{shade:false})">無遮罩</button>
  4.  
  5. <button class="xbutton" οnclick="xtip.alert('無圖標')">無圖標</button>
  6. <button class="xbutton" οnclick="xtip.alert('成功','s')">成功</button>
  7. <button class="xbutton" οnclick="xtip.alert('失敗','e')">失敗</button>
  8. <button class="xbutton" οnclick="xtip.alert('警告','w')">警告</button>
  9. <button class="xbutton" οnclick="xtip.alert('詢問','a')">詢問</button>
  10. <button class="xbutton" οnclick="xtip.alert('微笑','h')">微笑</button>
  11. <button class="xbutton" οnclick="xtip.alert('自定義圖標',['css/img.png','black'])">自定義圖標</button>

通知執行

xtip.win({
                        tip: '地址修改成功!',
                        icon: 'success',
                        title: '通知',
                        btn: ['確定'],
                        btn1: function () {
                            app.hideLoading();
                            window.history.go(-1); location.reload()
                        }

                    });

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章