弹出的模式对话框
是没有右键菜单的,原本是不可以复制的,
但是可通过其他手段变相的实现复制
DIV 元素 的有一个属性
contentEditable 设置或获取表明用户是否可编辑对象内容的字符串
<head>
<SCRIPT>
function chgSpan() {
currentState = oSpan.isContentEditable;
newState = !currentState;
oSpan.contentEditable = newState;
oCurrentValue.innerText = newState;
newState==false ? oBtn.innerText="Enable Editing" :
oBtn.innerText="Disable Editing"
}
</SCRIPT>
</head>
<body onload="oCurrentValue.innerText = oSpan.isContentEditable;">
<P>Click the button to enable or disable SPAN content editing.</P>
<P>
<BUTTON ID="oBtn" onclick="chgSpan()">Enable Editing</BUTTON>
</P>
<P><SPAN ID="oSpan">You can edit this text.</SPAN></P>
Span can be edited: <SPAN ID="oCurrentValue"></SPAN>
</body>
大家试试这个方式