IE6sp1下测试好用!
L@_@K
<!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> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="Gao YiXiang" />
<meta name="email" content="[email protected]" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
</head>
<body>
<input class="supInput3" name="PrdName" type="text" id="PrdName"
onkeydown="processKeyDown(event)" value="" size="30" />
<script type="text/javascript">
<!--
function processKeyDown(e)
{
// copy.
PrdName.value = e.ctrlKey;
if (e.ctrlKey && (e.keyCode==67 ¦¦ e.keyCode==99))
{
alert("Ctrl+C");
event.returnValue =false;
//copyClicked(selectedNode);
}
// paste.
if (e.ctrlKey && (e.keyCode==86 ¦¦ e.keyCode==118))
{
alert("Ctrl+V");
event.returnValue =false;
//pasteClicked( selectedNode, 'treeController', null);
}
}
//-->
</script>
</body>
</html>
L@_@K
<!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> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="Gao YiXiang" />
<meta name="email" content="[email protected]" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
</head>
<body>
<input class="supInput3" name="PrdName" type="text" id="PrdName"
onkeydown="processKeyDown(event)" value="" size="30" />
<script type="text/javascript">
<!--
function processKeyDown(e)
{
// copy.
PrdName.value = e.ctrlKey;
if (e.ctrlKey && (e.keyCode==67 ¦¦ e.keyCode==99))
{
alert("Ctrl+C");
event.returnValue =false;
//copyClicked(selectedNode);
}
// paste.
if (e.ctrlKey && (e.keyCode==86 ¦¦ e.keyCode==118))
{
alert("Ctrl+V");
event.returnValue =false;
//pasteClicked( selectedNode, 'treeController', null);
}
}
//-->
</script>
</body>
</html>
解决方案 »
- 求帮忙看看这一验证登录名的正则表达式
- 帮看一段JS 谢谢 关于层的关闭开启
- jquery如何写类似a:hover这种的css
- 关于checkbox的判断选中问题,求助
- Vs2008调试没问题,IIS发布就不正常
- jquery focus怎么失效啊??在事件里面
- 发布一个我刚刚写的一个 停顿滚动广告类
- 请教各位高手一个Javascript文件操作的问题。
- var Atext=new Array(); Atext["a"]="a";Atext["b"]="b";alert(Atext.length),不能求出Atext数组元素的个数,请问有什么方法求出?并能
- 如何通过JavaScript取当前用户的IE的临时文件夹?
- 请教:错误:对象不支持此属性或方法!
- 请教一个正则表达式
<input class="supInput3" name="PrdName" type="text" id="PrdName"
onkeypress="processKeyDown(event)" value="" size="30" onkeydown="processKeyDown(event)" /> <script>
function processKeyDown(e) {
// copy.
alert(e.ctrlKey);
if (e.ctrlKey && (e.charCode==67 || e.charCode==99)) {
alert("Ctrl+C");
//copyClicked(selectedNode);
}
// paste.
if (e.ctrlKey && (e.charCode==86 || e.charCode==118)) {
alert("Ctrl+V");
//pasteClicked( selectedNode, 'treeController', null);
}
} </script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head><body>
<input class="supInput3" name="PrdName" type="text" onkeydown="processKeyDown()" value="" size="30" /> <script language="javascript">
function processKeyDown(){
// copy.
if((event.ctrlKey)&&(event.keyCode==67)) {
alert("Ctrl+C");
//copyClicked(selectedNode);
}
if((event.ctrlKey)&&(event.keyCode==86)) {
alert("Ctrl+V");
//copyClicked(selectedNode);
}
} </script>
</body></html>