This is the code in my index.html in eclipse. However, when you click the Click button, nothing happens. What could be the disadvantage?

This is the code in my index.html

file in Eclipse. Part javascript

doesn't work.

When I click the "Click" button, the function send()

fails. no warning window is displayed.

Even if I do <button onClick="alert('heloo')">Click</button>

, no warning appears.

<!DOCTYPE html>
<html>
    <head>
        <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">
        <link rel="stylesheet" type="text/css" href="css/index.css">

        <title>Hello World</title>
    </head>
    <body>
        <p>hello</p>
        <button onClick="send()">Click</button>
        <script type="text/javascript">
            function send(){
                alert("Heloo");
            }
        </script>
    </body>
</html>

      

+3


source to share





All Articles