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

Thread: Hello world output

  1. #1
    Learning Programmer Khaotic will become famous soon enough Khaotic will become famous soon enough
    Join Date
    Apr 2009
    Posts
    37

    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. #2
    Administrator Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan's Avatar
    Join Date
    Nov 2005
    Location
    Hendersonville, NC
    Posts
    24,556
    Blog Entries
    97

    Re: Hello world output

    You could also do

    Code:
    alert("Hello World");

  3. #3
    Xav
    Xav is offline
    Code Slinger Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav's Avatar
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,210
    Blog Entries
    13

    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

  4. #4
    Code Slinger chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5's Avatar
    Join Date
    Mar 2008
    Posts
    7,023
    Blog Entries
    1

    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?
    "Whenever you remember, I'll be there/
    Remember how we reached that dream together" - Carrie Underwood

  5. #5
    Learning Programmer Khaotic will become famous soon enough Khaotic will become famous soon enough
    Join Date
    Apr 2009
    Posts
    37

    Re: Hello world output

    Thats your way of saying it sucked?

  6. #6
    Code Warrior
    /////////|||||\\\\\\\\\
    amrosama is a splendid one to behold amrosama is a splendid one to behold amrosama is a splendid one to behold amrosama is a splendid one to behold amrosama is a splendid one to behold amrosama is a splendid one to behold amrosama is a splendid one to behold amrosama's Avatar
    Join Date
    Aug 2007
    Location
    Pyramids st, Giza, Egypt
    Age
    21
    Posts
    8,182
    Blog Entries
    12

    Re: Hello world output

    its not bad
    keep posting tutorials

  7. #7
    Code Slinger chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5's Avatar
    Join Date
    Mar 2008
    Posts
    7,023
    Blog Entries
    1

    Re: Hello world output

    Not at all, I was giving you constructive criticism. Can't wait to see more from you.
    "Whenever you remember, I'll be there/
    Remember how we reached that dream together" - Carrie Underwood

  8. #8
    Xav
    Xav is offline
    Code Slinger Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav has much to be proud of Xav's Avatar
    Join Date
    Mar 2008
    Location
    The North Pole
    Posts
    13,210
    Blog Entries
    13

    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

  9. #9
    Learning Programmer Khaotic will become famous soon enough Khaotic will become famous soon enough
    Join Date
    Apr 2009
    Posts
    37

    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.

  10. #10
    Code Slinger chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5's Avatar
    Join Date
    Mar 2008
    Posts
    7,023
    Blog Entries
    1

    Re: Hello world output

    How about giving more detail on the document object?
    "Whenever you remember, I'll be there/
    Remember how we reached that dream together" - Carrie Underwood

+ Reply to Thread
Page 1 of 2
1 2 LastLast

Thread Information

Users Browsing this Thread

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

     

Similar Threads

  1. C/C++ Hello World Tutorial
    By Khaotic in forum C Tutorials
    Replies: 6
    Last Post: 07-28-2009, 10:35 AM
  2. Visual Studio 2008: C# Hello World Tutorial
    By Jordan in forum CSharp Tutorials
    Replies: 27
    Last Post: 07-23-2009, 04:32 PM
  3. output code
    By kenex in forum C and C++
    Replies: 10
    Last Post: 02-03-2009, 06:09 AM
  4. Tutorial: C# Hello World
    By Jordan in forum CSharp Tutorials
    Replies: 15
    Last Post: 10-16-2008, 10:44 PM
  5. HELP! C# Output
    By jclarke in forum C# Programming
    Replies: 4
    Last Post: 02-15-2008, 07:51 PM

Bookmarks

Bookmarks

     
        Algorithms and Data Structures

        Java tutorials

        Algorithms Forum

Posting Permissions

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