zoukankan      html  css  js  c++  java
  • Vs2013 html5开发WP8.1 APP之alert

    Js的alert不被支持

    使用

    navigator.notification.alert

    需要在CONFIG中增加

     

     

    示例

     

    1. <script type="text/javascript">
    2.         function showAlert() {
    3.             navigator.notification.alert(
    4.                 'You are the winner!', // message
    5.                 null, // callback
    6.                 'Game Over', // title
    7.                 'Done' // buttonName
    8.             );
    9.         };
    10.         function testStorage() {
    11.             if (window.localStorage) {
    12.                 navigator.notification.alert('浏览器支持localStorage', showAlert, "Config", "OK");
    13.             } else {
    14.                 navigator.notification.alert("浏览器暂不支持localStorage", null, "Config", "OK");
    15.             }
    16.             if (window.sessionStorage) {
    17.                 navigator.notification.alert("浏览器支持sessionStorage", null, "Config", "OK");
    18.             } else {
    19.                 navigator.notification.alert("浏览器暂不支持sessionStorage",null,"Config","OK")
    20.             }
    21.         }
    22.     </script>

     

    效果

     

     

     

     

     

     

     

  • 相关阅读:
    (转)MVC 与三层架构
    (转)CentOS一键安装Nginx脚本
    (转)Python异常类的继承关系
    CMFCPropertyGridProperty用法
    C语言终极面试及答案分析
    C/C++函数指针(typedef简化定义)
    UNIX 家族及Linux
    Socket的综合应用总结
    Socket模型(二):完成端口(IOCP)
    socket通信中select函数的使用和解释
  • 原文地址:https://www.cnblogs.com/QinQouShui/p/4444186.html
Copyright © 2011-2022 走看看