本帖最后由 每天成长一点点 于 2015-10-26 11:55 编辑
<html> <head> <!-- Customize this policy to fit your own app's needs. For more guidance, see: Some notes: * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this: * Enable inline JS: add 'unsafe-inline' to default-src --> <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *"> <meta name="format-detection" content="telephone=no"> <meta name="msapplication-tap-highlight" content="no"> <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"> <meta http-equiv='Content-Type' Content="text/html;charset=utf-8"/> <link rel="stylesheet" type="text/css" href="css/index.css"> <link rel="stylesheet" Type="text/css" href="css/mainView.css"> <title>Hello World</title> <script type="text/javascript" charset="utf-8" language="javascript" src=" cordova.js"></script> </head> <body> <div class="mainView" onclick='event.cancelBubble=true'> </br> <button>按钮</button></br> <button>按钮1</button> </div>
</body> <script type="text/javascript"> window.onload = inOpen; function inOpen(){ console.warn("11111111111111++++++"); } </script> </html> 界面可以显示两个按钮 但是却不执行window.load 按钮的函数也执行不了 代码放到webStorm就可以执行
|