Posted by Unknown at 6:15 PM
Read our previous post
Write your first javaScript code:
I think you have now the basic idea of javaScript and why this language has been created.For practice you need a text editor like notepad++,conText,Sublime text etc.
# Go to your text editor and make a document save as test.html.
# Here we will write the javaScript code.
N.B.JavaScript codes can be written in any position you need within HTML documents.
Now, write your first code.
#After the body tag write
<script type="text/javascript"></script>
You will write your javaScript code between this tag.
# Now let's having your first code:
<script type="text/javascript">
document.write("Welcome to Mywebtune");
</script>
N.B:There must be endwith ";" symbol and the document will be within("document");
# If you want to make alert box then write
<script type="text/javascript">
alert("Welcome to Mywebtune!");
</script>
You will get a output with alert box when visiting your site.See the above codes
first-javascript
# Now let's having your first code:
<script type="text/javascript">
document.write("Welcome to Mywebtune");
</script>
N.B:There must be endwith ";" symbol and the document will be within("document");
# If you want to make alert box then write
<script type="text/javascript">
alert("Welcome to Mywebtune!");
</script>
You will get a output with alert box when visiting your site.See the above codes
first-javascript
its very helpful
ReplyDelete