Hello Elite Pvpers, now i will teach you how to work with javascript. This tutorial is only for beginners there would be more parts...
Everytime when you want to add javscript code on your html website you must have
<script type="text/javscript">
</script>
Thosse 2 script types. Otherwise nothing is going to work, always when you want write some code, write it down the <script type>.
The javascript its not same like HTML or PHP you can't just write your text and done. The syntax is almost same like C
When you want to create .js file you don't need to write the script types because the file is already javascript
Always when you want to write text/numbers .etc your code must start with
document.write
That means you want to write something on the document.
It's not that all when you wrote the document.write you must put (); after it
document.write();
And to write in text your document.write must looks like this
document.write("Your text here");
And to write numbers your document write can be without ""
Example:
document.write(3213);
That only works for numbers, to write text you must have ""
*Note: You need Notepad++ to edit javascript better. You can use also notepad its not such a problem.
The javascript document.write works also when you want count something
For example
document.write(1+1);
And in the website will be 2
or
document.write(7*7);
In the web will be 49. But must be without "" otherwise wont work
Alright guys, thanks for reading this tutorial i hope helps for beginners.
The next part is coming after this tutorial and will be "How to working with variables and boxes"