<html><head>
<title></title>
</head><body>
<script language="javascript">
designMode = "On";
</script>
<input type="button" value="粗体" onclick="document.execCommand('Bold');"><br>
怎么用javascript检测页面中鼠标选中的文字,如Word里面的文字选中了,然后把选中的文字设为粗体,是怎么做的呢?
</body></html>
<title></title>
</head><body>
<script language="javascript">
designMode = "On";
</script>
<input type="button" value="粗体" onclick="document.execCommand('Bold');"><br>
怎么用javascript检测页面中鼠标选中的文字,如Word里面的文字选中了,然后把选中的文字设为粗体,是怎么做的呢?
</body></html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货