81,122
社区成员




<script language="javascript">
function switchIME(enable){
var root = document.getElementById("mead");
var show = document.getElementById("show");
if(enable){
show.innerHTML = "IME has opened.";
root.style.cssText = "ime-mode:auto;width:300px;height:400px;";
}else{
show.innerHTML = "IME has closed.";
root.style.cssText = "ime-mode:disabled;width:300px;height:400px;";
}
}
</script>
<textarea id="mead" style="ime-mode:disabled;width:300px;height:400px;" >
</textarea>
<br/>
<br/>
<div id="show">hello you.</div>
<br/>
<input type="button" onclick= "switchIME(true);" value="开启中文输入" />
<input type="button" onclick= "switchIME(false);" value="关闭中文输入" />
<script language="JScript">
alert( document.onkeydown);
</script>
<input onclick="javascript:alert( document.onkeydown );" type="button" value="查看document.onkeydown "/>
<script language="JScript" for="document" event="onkeydown">
</script>