Script Categories













Calculators >>> Dog Years.

This is a practically useless script. Convert your age to dog years. (Your age * 7) But, it's helpful for people beginning JavaScript to look at.

Enter your age:
Your age in Dog Years is:

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
function fido (form) {
form.dogyears.value = form.humanyears.value*7;
}
// End -->
</script>
<FORM>
<table>
<tr>
<td>
Enter your age:</td>
<td>
<INPUT TYPE ="text" NAME="humanyears" SIZE=15 ></td>
</tr>
<tr>
<td>
<INPUT TYPE ="button" VALUE="Calculate" ONCLICK="fido(this.form)"></td><td></td>
</tr>
<tr>
<td>
Your age in Dog Years is:</td>
<td>
<INPUT TYPE="text" NAME="dogyears" SIZE=15 ></td>
</tr>
</table>
</FORM>

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.



Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).

R7


©