<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<input id="aaa" type="text" style="border-color:#00FF66" onblur="ok()"></input><script language="javascript">
function ok(){
alert("dsa");
document.getElementById("aaa").value="1";
document.getElementById("aaa").style.border-color=red; }</script>
</body>
</html>我想实现把鼠标移到文本去就会改变文本域边框颜色。上面代码怎么无法实现呢 JS函数无法实现 - -求高手帮忙·
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<input id="aaa" type="text" style="border-color:#00FF66" onblur="ok()"></input><script language="javascript">
function ok(){
alert("dsa");
document.getElementById("aaa").value="1";
document.getElementById("aaa").style.border-color=red; }</script>
</body>
</html>我想实现把鼠标移到文本去就会改变文本域边框颜色。上面代码怎么无法实现呢 JS函数无法实现 - -求高手帮忙·
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<input id="aaa" type="text" style="border-color:#00FF66" onfocus="ok()"></input><script language="javascript">
function ok(){
alert("dsa");
document.getElementById("aaa").value="1";
document.getElementById("aaa").style.borderColor="red";
}
</script>
</body>
</html>