我正在使用以下代码:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="WebApplication3.Site1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="style.css" rel="stylesheet" />
<script type="text/javascript">
function change(color) {
document.bgColor = color;
}
</script>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<p> </p>
<div class="green">
<div id="slatenav">
<ul>
<li><a href="WebForm3.aspx" id="green" onclick="change('green')">Home</a></li>
<li><a href="WebForm4.aspx" id="red" onclick="change('red')">About Us</a></li>
</ul>
</div>
</div>
<div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
为什么它不能正常工作?