mardi 27 juillet 2021

Uncaught ReferenceError: init is not defined error [closed]

I'm trying to connect blockchain with web frontend.

But I can't resolve the error Uncaught ReferenceError: init is not defined.

index.html snippet

<html>
    <head>
        <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
        <meta content="utf-8" http-equiv="encoding">
        <script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
        <!--script src="https://cdn.rawgit.com/ethereum/web3.js/develop/dist/web3.js"></script-->
        <!--script src="bower_components/abi-decoder/dist/abi-decoder.js"></script-->
        <script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.0.0-beta.36/dist/web3.min.js" integrity="sha256-nWBTbvxhJgjslRyuAKJHK+XcZPlCnmIAAMixz6EefVk=" crossorigin="anonymous"></script>

        
        <script src="./bundle.js" type="text/javascript"></script>
    </head>

    <body onload="init()">

bundle.js snippet

function init() {
...
}

In bundle.js, init() is obviously exists.. But this error occured everytime. I'm new to HTML programming. Thank you for any help.




Aucun commentaire:

Enregistrer un commentaire