Jump to content

Emi_98

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Emi_98

  1. Hello, fellow developers or learners. I was trying to implement an example I saw here: https://www.w3schools.com/js/js_whereto.asp. 

    The script was 

    function myFunction() {

      document.getElementById("demo").innerHTML = "Paragraph changed.";
    } .

    It was titled ‘File.js’ . 

    The HTML text was 

    <!doctype HTML>
    <HTML>

    <BODY>
        
     <h2>An External JavaScript</h2>   
    <p ID = "demo">A paragraph</p>  
    <button type = "BUTTON" ONCLICK = "myFunction">TRY IT</button>   

    <script src = "content://com.estrongs.files/storage/emulated/0/JavaScript/File.js"></script>
    </BODY>    
        

    </HTML> When I load the HTML page and I click the “Try it” button, *A paragraph* does not change to *paragraph changed*. Do you understand what I'm trying to say, please?

×
×
  • Create New...