Hey, i'm having some problems with the javascript indexof function.

I have this:
Code:
function checkinvalid() {
var cde, def

cde = document.getElementById('username');
def = document.getElementById('password');

if (cde.value.indexof == "<"||def.value.indexof == "<"||cde.value.indexof == ">"||def.value.indexof == ">") {
	alert("The < or > character cannot be used");
	return false;
}else{
	return true;
}}
Its returning true though :S I cant figure out why. I've tried escaping the < and > but its still not working. Anyone got any suggestions please??

Thanks, BIOSTALL