Can anyone tell me what's wrong with this js? Just trying to call with onClick="check_input('some words')" on the input. I'm a js n00b and don't really know how 'this' works... cheers!
[cpp]
function check_input(contents) {
if (this.value == contents) {
this.value = '';
} else {
if (this.value == '') { {
this.value = contents;
}
}
}[/cpp]
[cpp]
function check_input(contents) {
if (this.value == contents) {
this.value = '';
} else {
if (this.value == '') { {
this.value = contents;
}
}
}[/cpp]