Jump to content

Chapter 1 lesson 8: I got error in console when I shouldn't have


webmanz

Recommended Posts

I got the same results as Stef in his video title Chapter 1 Lesson 8 (Javascript). The video did not say to check console I just decided to.

Here's the error I got and why did this occur in one browser but not in Google Chrome browser:

"The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol."

Here's my code from Sublime Text:

<!DOCTYPE html>
<html>
<head>

  
      <title> Chapter 1 Javascript part 5</title>

      <style type="text/css">
        

      </style>
    
    <script>
        function myFunction() {

        alert("Display Message");
        prompt ("Please enter your name" , "Name ..");
    }
    </script>
</head>

<body>
<h1> Welcome to Javscript</h1>
<button id="butt" type="button" onmouseover ="myFunction()">Try it</button>
<p onmouseover="myFunction()"> "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p>

 

<p > "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p>

Edited by webmanz
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...