/ Published in: JavaScript
Arguments: Element from a form.
Take that element and checks if is filled. If not, returns false. If is filled, returns true.
From book Dom Scripting by Jeremy Keith
Take that element and checks if is filled. If not, returns false. If is filled, returns true.
From book Dom Scripting by Jeremy Keith
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function isFilled(field) { if (field.value.length < 1 || field.value == field.defaultValue) { return false; } else { return true; } }