<script>
function cc()
{
var g = document.selection.createRange();
if(g.text.length>1 && g.text.length<=6)
{
window.alert(g.text);
}
}
</script>
<div id="d1" οnmοuseup="cc();">此处显示 id "d1" 的内容</div>
<script>
function cc()
{
var g = document.selection.createRange();
if(g.text.length>1 && g.text.length<=6)
{
window.alert(g.text);
}
}
</script>
<div id="d1" οnmοuseup="cc();">此处显示 id "d1" 的内容</div>
转载于:https://www.cnblogs.com/icejd/archive/2007/11/16/961204.html