搜狗输入法引起的event
firefox 当输入法是搜狗中文的时候,点击按键,此时是keydown,keypress,字也写在了文本框中,再点另一个键(如enter,空格选择字体)等都指执行keyup,但ie第一次是keydown,keyup,没写字,第二次也是keydown,keyup。<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gbk" /><title>Imitate the WordPress Comment Management_??ZCOOL_www.zcool.com.cn</title><style type="text/css">a {background: red;}.aa1 {background: green;}</style><script type="text/javascript" src="../js/jquery.js"></script><script> $(document).ready(function(){ $("#mao1").blur(function(){//$("#mao1").get(0).style.visibility = "hidden";log("blur")});$("#mao1").mousedown(function(){log("mousedown")})$("#mao1").click(function(){log("click")})$("#mao1").keyup(function(){log("keyup")})$("#mao1").keypress(function(){log("keypress")})$("#mao1").focus(function(){log("focus")})$("#mao1").keydown(function(){log("keydown")})$("#mao1").mouseup(function(){log("mouseup")})}) </script> </head> <body> dfsadfs<input type="text" id="mao1"/><textarea id="ta" style="float:right; width:200px;height:1000px;"></textarea><script type="text/javascript">function log(str){document.getElementById('ta').value += '\n' + str;}</script></body> </html>
页:
[1]