Js的alert不被支持

使用

navigator.notification.alert

需要在CONFIG中增加

Vs2013 html5开发WP8.1 APP之alert

 

 

示例

 

  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>

 

效果

 

Vs2013 html5开发WP8.1 APP之alert

 

 

Vs2013 html5开发WP8.1 APP之alert

 

 

Vs2013 html5开发WP8.1 APP之alert

 

 

相关文章:

  • 2021-12-25
  • 2021-05-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2021-10-21
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
  • 2022-01-08
  • 2021-09-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案