Email:info@beework.net
Sales:
0800 882 4173
Support:
0117 230 7000
Mobile:
07866 627185
International:
+44 (0)117 230 7000
Ready Made Solutions
Photographer website
Estate & letting agents
Events & ticket sales
Charities
Church website
Wedding day
Holiday let website
Bookmark with
Generates JavaScript if then code. Just Click the button to see the If Then Syntax.
if (condition) {
statements1
[ } else {
statements2 ]
}The condition can be any JavaScript expression that evaluates to true or false. The statements to be executed can be any JavaScript statements, including further nested if statements. If you want to use more than one statement after an if or else statement, you must enclose the statements in curly braces, {}. Example. In the following example, the function checkData returns true if the number of characters in a Text object is three; otherwise, it displays an alert and returns false.
function checkData () {
if (document.form1.threeChar.value.length == 3) {
return true
} else {
alert("Enter exactly three characters. " +
document.form1.threeChar.value + " is not valid.")
return false
}
}