+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Hello world output

  1. #1
    Khaotic is offline Learning Programmer
    Join Date
    Apr 2009
    Location
    Brandon, Mississippi, United States
    Posts
    62
    Rep Power
    12

    Post Hello world output

    This tutorial is to basically show you how to output text to the browser using javascript

    Example:
    Code:
    <script type="text/javascript">
    document.write("Hello World");
    </script>
    <script type="text/javascript"> - This means that anything enclosed in this is javascript code

    document.write("Hello World"); - Document is an object that refers the the web page. write is a method that means you want to write to the object. Whatever is defined in the parenthesis means that you want to write that to the object.

    </script> - this just tells the web page that you are done defining you javascript code.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    Jordan Guest

    Re: Hello world output

    You could also do

    Code:
    alert("Hello World");

  4. #3
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,174
    Blog Entries
    13
    Rep Power
    114

    Re: Hello world output

    Or just make an HTML file that contains the words "Hello World", and then call window.open().

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

  5. #4
    Join Date
    Mar 2008
    Posts
    7,144
    Rep Power
    86

    Re: Hello world output

    Interesting.

    Maybe you could write a tutorial about using the document object? How about what the different methods in the document object do?

  6. #5
    Khaotic is offline Learning Programmer
    Join Date
    Apr 2009
    Location
    Brandon, Mississippi, United States
    Posts
    62
    Rep Power
    12

    Re: Hello world output

    Thats your way of saying it sucked?

  7. #6
    Join Date
    Aug 2007
    Location
    Gizeh, Al Jizah, Egypt, Egypt
    Posts
    8,675
    Blog Entries
    12
    Rep Power
    81

    Re: Hello world output

    its not bad
    keep posting tutorials
    yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
    Code:
    eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
    www.amrosama.com | the unholy methods of javascript

  8. #7
    Join Date
    Mar 2008
    Posts
    7,144
    Rep Power
    86

    Re: Hello world output

    Not at all, I was giving you constructive criticism. Can't wait to see more from you.

  9. #8
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,174
    Blog Entries
    13
    Rep Power
    114

    Re: Hello world output

    The thing is, a lot of us here are experienced coders. This script is the most basic one I have ever seen - not to say that is necessarily a bad thing, but for many people this tutorial is stating the obvious.

    Next time go for something more involved.

    Quote Originally Posted by Jordan View Post
    Good members, like yourself, stick around and post for ages to come!
    Mr. Xav | Blog | Forums

  10. #9
    Khaotic is offline Learning Programmer
    Join Date
    Apr 2009
    Location
    Brandon, Mississippi, United States
    Posts
    62
    Rep Power
    12

    Re: Hello world output

    Quote Originally Posted by Xav View Post
    The thing is, a lot of us here are experienced coders. This script is the most basic one I have ever seen - not to say that is necessarily a bad thing, but for many people this tutorial is stating the obvious.

    Next time go for something more involved.
    Yeh, I get what you all are saying. I haven't really coded much in javascript. I only do it for site manipulation. I am more on the php/c/c++ side of things. I can do a little more complicated stuff in those.

  11. #10
    Join Date
    Mar 2008
    Posts
    7,144
    Rep Power
    86

    Re: Hello world output

    How about giving more detail on the document object?

+ Reply to Thread
Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 9
    Last Post: 01-14-2011, 12:59 PM
  2. Intel Output help
    By ahmed in forum Assembly
    Replies: 1
    Last Post: 10-26-2010, 12:45 PM
  3. what is the output and why?
    By alok541 in forum C and C++
    Replies: 1
    Last Post: 02-06-2010, 05:31 AM
  4. how this output could be like this...
    By noteeth in forum C and C++
    Replies: 2
    Last Post: 11-01-2009, 05:36 AM
  5. HELP! C# Output
    By jclarke in forum C# Programming
    Replies: 4
    Last Post: 02-15-2008, 05:51 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts