文本域与文本区在打开中文输入法时,所有keyCode与which的取值都不对,在opera下总为197,在其他浏览器下总为229。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>dom Framework</title>
<script src="/neo/dom.js"></script>
<script>
dom.require("ready,event",function(){
dom("#test").keydown(function(e){
dom("#container").text(e.keyCode);
});
});
</script>
</head>
<body>
<input id="test"/>请先打开中文输入法
<span id="container"></span>
</body>
</html>