2个回答
展开全部
var oldKey="";
function showKey(allStr,keyStr){
if(oldKey!=""){
allStr.replace("<font color='#ff0000'>"+oldKey+"</font>",oldKey);
}
if(keyStr!=""){
allStr.replace(keyStr,"<font color='#ff0000'>"+keyStr+"</font>");
}
oldKey = keyStr;
}
function showKey(allStr,keyStr){
if(oldKey!=""){
allStr.replace("<font color='#ff0000'>"+oldKey+"</font>",oldKey);
}
if(keyStr!=""){
allStr.replace(keyStr,"<font color='#ff0000'>"+keyStr+"</font>");
}
oldKey = keyStr;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询