Write Hello World! using Javascript - document.write()

November 27, 2010

Now we are going to write "Hellow World!!!" on the page using Javascript..

Type this code on your text editor and save it as a HTML document like "hellowWorld.html" or something else..
Then open it with your Internet Browser

<html>
<head>
<title>Write Hellow World!!! with Javascript</title>
</head>
<body>  

     <script language="javascript" type="text/javascript">
     document.write("Hellow World!!!");
     </script>


</body>
</html>

You will see the result like

Hellow World!!!

************************************

We can embed Javascript inside the <body>....</body> tags like above example. And inside the <head>...</head> tags. Let's see it later...

What is the document.write()

document.write() is a command to your browser. We call it as a Statement
in this document.write() statement tells to the browser to write something on the page

in this case it tells to write Hellow World!!! on the page..

We can write some strings with double or single quotes like this and we can add two strings using + operator

* try this one as an activity : document.write(" Hi "+" Hellow "+" World ");

And we can insert some HTML tags inside the brackets

* try these activities

document.write("<b>Hellow</b>  World!!! ");

document.write("<p><i><u>Hellow</u>  World!!!</i> </p>");

document.write("<h1>Hellow World!!!</h1>");

document.write("<p>Hellow <br />  World!!! </p>");

 

Javascript Tutorial - Introduction to Javascript

November 27, 2010
What is the Javascript

Javascript is a light-weight scripting language, not a high level programming language.

It is case sensitive, ( "JAVASCRIPT" and "Javascript" is not same )

we can write javascript codes on a HTML file inverted the <script>....</script> tags.

we can use a simple text editor like gedit (on linux), TextWrangler (on Mac) or notepad (on windows) to write javascript codes.

we do not want compile javascript codes before use it.

We use javascript on web pages and we use it to add in...
Continue reading...
 

How INSERT data to a Database Table from a text file

September 1, 2010
If you have a text file and if you want to Insert data to your Database Table, You can do it with these instructions and screen shots.

1. You should run some sql queries to do it on your server
   In my case :
         server (local) is ==> localhost
         my table is ==> ipbank
         and my text file is ==> ipdata.txt

2. Goto your MYSQL command prompt, I am using phpMyAdmin




3. Then Insert the queries like this

LOAD DATA LOCAL INFILE '/opt/lampp/htdocs/site/ipdata.txt' INTO TABLE ipbank
FIELD...

Continue reading...
 
Make a Free Website with Yola.