The preliminary judgment is that the Obj.style.backgroundColor returns in FF is the reason of RGB (xxx,xxx,xxx). I am a novice, the code is very vegetable, master don't laugh Ah
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <ptml xmlns=" http://www.w3.org/1999/xhtml "> <pead> <meta http-equiv=" Content-type "content=" text/html; Charset=utf-8 "/> <title>untitled document</title> <style type=" Text/css "> A.blue:link,a.blue: visited{font-size:12px; Color: #69c; Text-decoration:none; a.blue:hover{background: #69c; Color: #fff; } </style> <script type= "Text/javascript" > Function Finsert (a,b) {oinput = document.getElementById (a); OITM = b; if (B.style.backgroundcolor = = "#69c") {sreplace = OItm.innerHTML.concat (""); Oinput.value = OInput.value.replace (Sreplace, ""); B.style.backgroundcolor = ""; B.style.color = ""; } else{Oinput.value = OInput.value.concat (oitm.innerhtml); Oinput.value = OInput.value.concat (""); B.style.backgroundcolor= "#69c"; B.style.color = "#fff"; } </script> </pead> <body> <input type= "text" id= "cc"/> keyword 2 keyword 3 </body> &l T;/html>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]