Add your website to the Xemion web designer directory and gain highly-targeted traffic and new leads.

java script

Post Reply
 
Thread Tools
 
#1 September 20, 2008 by remmy - Junior Member, 1 posts PHP: , RoR: , CSS/XHTML:  , Design: , Javascript: , ASP/.NET: , SEO: , SQL: Reputation Level
JavaScript is a programmable API that allows cross-platform scripting of events, objects, and actions. It allows the page designer to access events such as startups, exits, and users' mouse clicks. JavaScript extends the programmatic capabilities of most browsers to a wide range of authors, and is easy enough for anyone who can compose HTML.
Using JavaScript, even less-experienced developers will be able to direct responses from a variety of events, objects, and actions. It provides anyone who can compose HTML with the ability to change images and play different sounds in response to specified events, such as a users' mouse click or screen exit and entry.
------------------
remmy


Guaranteed ROI
 
#2 September 23, 2008 by mathewhadley - Junior Member, 1 posts PHP: , RoR: , CSS/XHTML:  , Design: , Javascript: , ASP/.NET: , SEO: , SQL: Reputation Level
To create a single line comment in JavaScript, you place two slashes "//" in front of the code or text you wish to have the JavaScript interpreter ignore. When you place these two slashes, all text to the right of them will be ignored, until the next line.
--------------------------
Mathew Hadley
word of mouth
 
#3 October 3, 2008 by PPP1 - Junior Member, 2 posts PHP: , RoR: , CSS/XHTML:  , Design: , Javascript: , ASP/.NET: , SEO: , SQL: Reputation Level
Quote:
Originally Posted by remmy View Post
JavaScript is a programmable API that allows cross-platform scripting of events, objects, and actions. It allows the page designer to access events such as startups, exits, and users' mouse clicks. JavaScript extends the programmatic capabilities of most browsers to a wide range of authors, and is easy enough for anyone who can compose HTML.
Using JavaScript, even less-experienced developers will be able to direct responses from a variety of events, objects, and actions. It provides anyone who can compose HTML with the ability to change images and play different sounds in response to specified events, such as a users' mouse click or screen exit and entry.
------------------
remmy


Guaranteed ROI
Thanks for info
 
#4 October 22, 2008 by myexpertise - Junior Member, 12 posts PHP: , RoR: , CSS/XHTML:  , Design: , Javascript: , ASP/.NET: , SEO: , SQL: Reputation Level
Hi,

Thanks for the info...

Here's my sample javascripts...

Create a welcome cookie

<html>
<head>
<script type="text/javascript">
function getCookie(c_name)
{
if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");
if (c_start!=-1)
{
c_start=c_start + c_name.length+1 ;
c_end=document.cookie.indexOf(";",c_start);
if (c_end==-1) c_end=document.cookie.length
return unescape(document.cookie.substring(c_start,c_end)) ;
}
}
return ""
}

function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : "; expires="+exdate.toGMTString());
}

function checkCookie()
{
username=getCookie('username');
if (username!=null && username!="")
{
alert('Welcome again '+username+'!');
}
else
{
username=prompt('Please enter your name:',"");
if (username!=null && username!="")
{
setCookie('username',username,365);
}
}
}
</script>
</head>
<body onLoad="checkCookie()">
</body>
</html>

A clock created with a timing event

<html>
<head>
<script type="text/javascript">
function startTime()
{
var today=new Date();
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
// add a zero in front of numbers<10
m=checkTime(m);
s=checkTime(s);
document.getElementById('txt').innerHTML=h+":"+m+" :"+s;
t=setTimeout('startTime()',500);
}

function checkTime(i)
{
if (i<10)
{
i="0" + i;
}
return i;
}
</script>
</head>

<body onload="startTime()">
<div id="txt"></div>
</body>
</html>





Style strings

<html>
<body>

<script type="text/javascript">

var txt="Hello World!";

document.write("<p>Big: " + txt.big() + "</p>");
document.write("<p>Small: " + txt.small() + "</p>");

document.write("<p>Bold: " + txt.bold() + "</p>");
document.write("<p>Italic: " + txt.italics() + "</p>");

document.write("<p>Blink: " + txt.blink() + " (does not work in IE)</p>");
document.write("<p>Fixed: " + txt.fixed() + "</p>");
document.write("<p>Strike: " + txt.strike() + "</p>");

document.write("<p>Fontcolor: " + txt.fontcolor("Red") + "</p>");
document.write("<p>Fontsize: " + txt.fontsize(16) + "</p>");

document.write("<p>Lowercase: " + txt.toLowerCase() + "</p>");
document.write("<p>Uppercase: " + txt.toUpperCase() + "</p>");

document.write("<p>Subscript: " + txt.sub() + "</p>");
document.write("<p>Superscript: " + txt.sup() + "</p>");

document.write("<p>Link: " + txt.link("http://www.w3schools.com") + "</p>");
</script>

</body>
</html>
___________________________
nebulizer cosmetic dentistry
Post Reply

Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Knowledge Base Script puthami Promotion & Marketing 1 September 18, 2008 09:57 PM
java irc help Talks_44 Javascript 0 September 19, 2007 04:47 PM
Java plug-in doesn't works anymore in IE evan100 Javascript 1 July 31, 2007 04:26 PM
Script for reservations attagirl Programming & Databases 0 April 19, 2007 06:00 PM
I'm looking for an image hosting script Sparta Programming & Databases 7 January 6, 2006 04:23 AM