function aaa() { //alert(document.getElementById("body1").createTextRange().htmlText); var mytext=document.body.createTextRange(); if (mytext.findText("aa")) { mytext.select(); alert(document.execCommand("FontSize",true,100); document.execCommand('ForeColor',false,'#BBDDCC');//true或false都可以 } } 设置到是可以,但是或许测试没成功
{
//alert(document.getElementById("body1").createTextRange().htmlText);
var mytext=document.body.createTextRange();
if (mytext.findText("aa"))
{
mytext.select();
alert(document.execCommand("FontSize",true,100);
document.execCommand('ForeColor',false,'#BBDDCC');//true或false都可以
}
}
设置到是可以,但是或许测试没成功