87,909
社区成员
发帖
与我相关
我的任务
分享
<!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>
<title>Torap betin jobalaw kwrsi</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8;" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="author" content="" />
<link href="" rel="stylesheet" />
</head>
<body onload="ifr.document.designMode='on'">
<iframe id="ifr" src="about:blank" width="25%" height="25%"></iframe>
<script type="text/JScript">
function ifr.document::onkeypress(){
alert(event.keyCode);
}
</script>
</body>
</html>
if (doc.attachEvent) doc.attachEvent('onkeypress', keyPress);
else doc.addEventListener('keyup', keyPress, false);
<!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>
<title>Torap betin jobalaw kwrsi</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8;" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="author" content="" />
</head>
<body onload="setEditor()">
<iframe id="ifr" src="about:blank" width="25%" height="25%"></iframe>
<script type="text/javascript">
function setEditor() {
var doc = document.getElementById('ifr').contentWindow.document;
doc.designMode = 'on'
function keyPress(e) { alert(e.keyCode) }
if (doc.addEventListener) { doc.addEventListener('keyup', keyPress, false); }
else doc.attachEvent('onkeypress', keyPress);
}
</script>
</body>