treehouse : what would you like to learn today?
Web Design Web Development iOS Development

JavaScript

  • I am new to JavaScript. The code I'm using is...

    <HTML>
    <HEAD>
    <TITLE>Script in Html Tags</TITLE>

    <BODY>
    <INPUT TYPE = Button VALUE = "Click Me" OnClick = "document.write('Hello World')>
    </BODY>
    </HTML>

    I get the button but 'hello world' doesn't appear when I click it.
  • <INPUT TYPE = Button VALUE = "Click Me" OnClick = "document.write('Hello World')>

    needs to be

    <input type="button" value="Click Me" onclick="document.write('Hello World')" />

    you're missing quotes on "button" and after document.write
  • I have a quick question, I am using some javascript for a table of mines in the web page, and it makes each image appear opaque until the user runs its mouse over it, and then the image lights up. I was wondering how would I go about making it so that the the image stays lit up according to whatever web page the user is currently on? Would I need an asp code or something for this?

    seo india