Jump to content
xisto Community
Sign in to follow this  
Mike

Learning Javascript. --What I know and a question--

Recommended Posts

How hard is it to fully learn javascript? People say it is easy, however, it looks pretty complicated! What do I know, you ask? I know how to make a button (that I describe in another post) so that when you click it, it generates something at random. I have the script for it here:<script language="text/javascript">var quotes = ["Insert what you want to be selected at random", <-- Separated by a COMMA, each QUOTE in QUOTATION MARKS.|||VAs many quotes as you want.];function getQuote(){var qs = document.getElementById("quote");var quote = quotesquotes[Math.floor(Math.random() * quotes.length)];alert(quote);}</script><tr><td bgcolor="Insert Colorname/hexadecimal value, here" align="center:><td>Describe button here.</td></font></tr><input onclick=getQuote() type="button" value="Button name goes here">.....Original script copyright by ROADDHOGG

Share this post


Link to post
Share on other sites

Ah, well, sadly that is the only JavaScript that I know. You guys don't really have to reply to this if you don't want to. Anyways, what's the difference between Java and JavaScript? I know that JavaScript is a scripting language but what is Java? Is that some kind of thing that runs those flash animations- does it have anything to do with animations?

Share this post


Link to post
Share on other sites

Hey lol you know more then me. I realyl like C++ and Assembly. But i never payed attention to Java Script. I agree with you All my friends said it was so easy. lol i dont think so. I think its pretty hard. At least it looks hard. But as does all other languages. Right now Me and ORION are trying to Learn Assembly. it looks so hard but you get the hang of the basics and it kinda starts to feed in .. so im hoping if i do that with java i can find my way through it so.. lol yeah but it does look hard

Share this post


Link to post
Share on other sites

if you want to learn Javascript and you already know HTML and the basics about programming (I mean loops and arrays and variables and stuff like that...) then what you have to do next is study the Document Object Model. The DOM is an object model that allows you to access the elements of an HTML page through Javascript. E.g. if you want to change an image named myImage (<img id='myImage'....>) then you could access it like that: document.myImage.src='.......' Note that there are some differences between the DOM in Explorer and Netscape.

Share this post


Link to post
Share on other sites

The effort spending to fully understand java script depends on your understanding of DHTML, DOM, Java concept.

 

I suggest you reading the book

 

"JavaScript: The Definitive Guide" published by O'Reilly

This is all you need to learn javascript.

 

If you'd like to know some tricks for coding, then you can start

"Javascript & DHMTL Cookbook" published by O'Reilly

 

There's no good book to learn the practical DOM. It is a very important part for you to code javascript. What I'm doing is read the DHTML reference of MSDN from Microsoft. When coding, keep it open is important.

 

How hard is it to fully learn javascript?  People say it is easy, however, it looks pretty complicated!  What do I know, you ask?  I know how to make a button (that I describe in another post) so that when you click it, it generates something at random.  I have the script for it here:

 

<script language="text/javascript">

 

var quotes = [

 

"Insert what you want to be selected at random", <-- Separated by a COMMA, each QUOTE in QUOTATION MARKS.

|

|

|

V

As many quotes as you want.

 

];

 

function getQuote()

{

var qs = document.getElementById("quote");

var quote = quotes

 

quotes[Math.floor(Math.random() * quotes.length)];

 

alert(quote);

}

</script>

 

<tr>

<td bgcolor="Insert Colorname/hexadecimal value, here" align="center:>

<td>Describe button here.</td>

</font>

</tr>

 

<input onclick=getQuote() type="button" value="Button name goes here">

.

.

.

.

.

Original script copyright by ROADDHOGG

29583[/snapback]

Share this post


Link to post
Share on other sites

I know that JavaScript is a scripting language but what is Java?  Is that some kind of thing that runs those flash animations- does it have anything to do with animations?

 

Flash animations are done in Flash. Java can do a lot of things, it's a general programming language. A lot of people make games, but you can make a bunch of stuff with it.

Share this post


Link to post
Share on other sites

Oh, I think the best way to learn javascript is to read a book and make lots of exercise. I tried to learn from w3schools several times, but ended up forgetting it all again..Well i think I bookmarked some good site for tutorials on learning js..le me check..yes at Webmonkey..make a google search cause I do not remember..

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.