<%@ Page Language= "C# " AutoEventWireup= "true " CodeFile= "Default27.aspx.cs " Inherits= "Default27 " %>
<!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 runat= "server ">
<title> Untitled Page </title>
<style type= "text/css ">
input:focus {background-color:red;}
</style>
</head>
<body>
<form id= "form1 " runat= "server ">
<div>
<input runat= "server " id= "Button1 " type= "button " value= "button " onserverclick= "Button1_ServerClick1 " /> </div>
<input type= "text " />
<input type= "text " />
</form>
</body>
</html>
我想知道为什么我的input获得焦点,颜色不会变红。
------解决方案--------------------
只知道A标记的用法,学习
------解决方案--------------------
因为ie不支持:focus
------解决方案--------------------
我用的Opera浏览器,测试通过!没有问题.
------解决方案--------------------
好像IE不行~~