answersLogoWhite

0

How do you do JavaScript?

Updated: 10/19/2022
User Avatar

Wiki User

15y ago

Best Answer

Java script or javascript. a javascript is just object orientated language that you can embed into HTML to make an object preform tasks that are much much harder for any other language to do. On the other hand a complete Java script is much harder because pure Java is a language that is used to develope games and takes a lot more time to do than javascript, but it can do so much more than Javascript.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

Before you program in javascript you must learn HTML and know how to use it without Dream-weaver or any other similar programs. But lets say you have this prerequisite.

You now have two options you can either embed the Javascript anywhere in your HTML or in a separate js file.

To embed all you do is use the <script> tags

example: <script type="text/javascript">JAVASCRIPT HERE</script>

To put your javascript in a separate file you call it like this

example: <script type="text/javascript" src="THE URL OF YOU JAVASCRIPT CODE" />

This is how you open up Javascript

If you want to program it though you have to learn the language

Here are some examples

<script type="text/javascript">

document.writeln("Hello World");

</script>

The above code will write "Hello World" in a browser when ran.

<script type="text/javascript">

alert("Hello World");

</script>

The above code will make an error box or better called alert box, appear and it will say "Hello World"

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you do JavaScript?
Write your answer...
Submit
Still have questions?
magnify glass
imp