Question:

How can i put a Java Script Code In My Website?

by  |  earlier

0 LIKES UnLike

I use a program called Website Tonight. I bought the domain at Go Daddy.

 Tags:

   Report

3 ANSWERS


  1. Like the top 2 said its is easy, but you would want

    it setup like this

    <script type="javascript">

    <!-- // for old browser's to not mess up

    //code here

    // -->

    </script>

    it gives support for older browsers which some people do not like to upgrade to.

    and instead of adding your javascript right into the page you could make it into a seperate file.

    <SCRIPT type="text/javascript" src="javascript.js"></SCRIPT>

    this is to make a seperate file to have the java code.

    *remember to use a outside javascript you need the file to have the ending .js (meaning .javascript)

    Add on:

    your code that has this:

    <!-- Content Gallery :: START -->

    <script language="javascript" type="text/javascript" src="http://prompt.zangocash.com/sp/864f...

    <script language="javascript" type="text/javascript">self.focus();</sc...

    <!-- Content Gallery :: END -->

    you need to set it like this:

    <script language="javascript" type="text/javascript" src="http://prompt.zangocash.com/sp/864f...

    <!-- // Content Gallery :: START -->

    </script>

    <script language="javascript" type="text/javascript">

    <!--

    self.focus();

    // Content Gallery :: END -->

    </script>


  2. Hi Dear,

    It is easy,

    if you have an html file ready , then

    right click and open the .html file with notepad.

    and insert java script code in <headr> tag

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

    <head>

    <script language="javascript" type="text/javascript">

    alert("Welcome to my site")

    </script>

    </head>

    .

    .

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

    Good luck..

  3. You can embed Javascript code in your page by inserting code between the script tags like this

    <scirpt language="javascript">

    //code here

    </script>

    You can put this code any where on the page in head or body.  

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.