|
Easy Java Script Code
Calculators for Your Website : Fahrenheit to Celsius Converter In this article, I provide you with Java Script code for a Decimal to Fahrenheit to Celsius /
Celsius to Fahrenheit Converter. I'll explain the code in detail so that you can have confidence
modifying it for use on your website. More ... Calculators for Your Web Site : Body Mass Index If you have a Web site related to health or dieting, or you just want to provide more useful
features on your Web site, you can provide a BMI calculator. This article shows you how to code
a Java Script BMI calculator for your Web site. More ... Prevent Automated Form Submissions With Java Script Spammers have robots that search the Web for such forms and when they find one, they use
automated programs to submit thousands of spam. Webmasters have developed a method to
prevent such abuse. In this article, I show you three different examples of using Java Script
to implement this method for your own web form. More ... Where Did the User Click? This code creates a webpage with an html div containing the words ONE TWo THREE. A Java Script
function uses the event object's clientX and clientY properties to determine which word the
user clicked on and displays it in a message box. More ... Slide Show with Different Size Images In this article, I explain how to code a slide show that can display different size images
without growing and shrinking your web page. I'll explain it in detail so that you can
understand and feel comfortable using the code, then you can cut and paste the code into
your webpage and modify it for your purposes. More ... Round a Float to 4 Digits to the Right of the Decimal Point On the typical PC, Java Script Math object methods can return floating point numbers with
up to 16 digits to the right of the decimal point. For most purposes, this kind of
accuracy is not required, nor desired, and that many digits causes nothing but confusion.
In this article, You'll learn how to round a floating point number to 4 digits to the
right of the decimal point. More ... Easy Java Script Timer Code Sometimes you need something to happen after a delay, or you need something to occur repeatedly.
This can be accomplished using Java Script timers. My objective in this article is to give you
the timer code without surrounding it with a lot of confusing peripheral code so you can quickly
use it for your own purposes. More ... Using the Java Script Date Object When you want to work with a date in Java Script, you need to use the Date object. In this
article, you learn how to create a Date object for today, or for any date in the past or future.
You learn how to find the difference between two dates, and how to format a date string any way
that you desire. You also learn how to validate a date string returned from a text box in a form,
which involved an introduction to JavaScript regular expressions. More ... Code for a Less annoying Popup Window In previous articles I have stated my opinion that it very discourteous and stupid for Webmasters use
advertising popup windows on their Web sites. They get paid $0.01 or less to shove a popup window in
your face. More ...
|