看看这个是你要的么??<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> New Document </title>
</head>
<body bgcolor="#FFFFFF">
<script>
function rdl_createRange1(){
var oMessage=document.all("oMessage");
var oTextRange=document.body.createTextRange();
with (oTextRange) {
moveToElementText(oMessage);
execCommand("SelectAll");
}
var oTextRange=document.selection.createRange();
}
</script>
<span id=oMessage>我是要被<b>选择</b>的信息。<img src="http://expert.csdn.net/images/csdn.gif" border=0 alt=""></span>
<br><br>
<input type=button value=" Gooooooooo " onclick="rdl_createRange1();">
<br><br>
</body>
</html>
<html>
<head>
<title> New Document </title>
</head>
<body bgcolor="#FFFFFF">
<script>
function rdl_createRange1(){
var oMessage=document.all("oMessage");
var oTextRange=document.body.createTextRange();
with (oTextRange) {
moveToElementText(oMessage);
execCommand("SelectAll");
}
var oTextRange=document.selection.createRange();
}
</script>
<span id=oMessage>我是要被<b>选择</b>的信息。<img src="http://expert.csdn.net/images/csdn.gif" border=0 alt=""></span>
<br><br>
<input type=button value=" Gooooooooo " onclick="rdl_createRange1();">
<br><br>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货