This is text field t1.

This is text field t2.

This button compares the contents of the two fields using javascript function "check".

This button compares the contents of the two fields using javascript function "checkAlt".


The javascript in the HEAD of this document.

<SCRIPT>
function check(){

(document.f1.t1.value==document.f1.t2.value)?alert("fields identical"):alert("fields different");

}


function checkAlt(){
if (document.f1.t1.value==document.f1.t2.value){
alert("fields identical")}
else{
alert("fields different")
}

}
</SCRIPT>