SoFunction
Updated on 2025-03-01

javascript gets the code of KeyCode in IE and FireFox at the same time


function submit1(e){
var isie = () ? true : false;//Judge whether it is an IE kernel or Mozilla
var key;
if (isie)
key = ;//IE usage event
else
{
key = ;//The 3 key functions have a default hidden variable, which is passed by e here. Give an index value to the Mo kernel (Note 1)
}

if(key==13)
send1('loginemail','loginpsw');//Triggered event, can be customized

}