1.toUpperCase
var name="zosatapo";
var uname=null;
uname=name.toUpperCase();
2.onKeyPress
就象鼠标事件可以分成很多类一样,onmousedown,onmouseup,onmousemove等等,键盘事件(按键事件)也可以分成很多类的,比如onKeyUp,onKeyPress。
只是提供你处理事件的时间问题,看你自己的需要了。
var name="zosatapo";
var uname=null;
uname=name.toUpperCase();
2.onKeyPress
就象鼠标事件可以分成很多类一样,onmousedown,onmouseup,onmousemove等等,键盘事件(按键事件)也可以分成很多类的,比如onKeyUp,onKeyPress。
只是提供你处理事件的时间问题,看你自己的需要了。
2。我问的是onKeyPress是代表什么事件???
<!--
function toUp(){
var str = "DDDDaaaaaa563456456$^$^#$@#$3DDDghfdgsdfg"; //
var strtemp = '';
for(var i =0;i<str.length;i++){
var n = str.charCodeAt(i); //Get the Unicode value of the
if(n>=97 && n<=122){
var s = str.charAt(i);
var m = String.fromCharCode(n-32);
}
else m = str.charAt(i);
strtemp = strtemp +m; }
alert(strtemp);
}//-->
</SCRIPT>