Here I will represent a article in this article we are using some code in asp.net in this article back ground colors are changes.Hope this article helpfull for you...................
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!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></title>
<script language="JavaScript" type="text/javascript">
function changecolor(code)
{
document.bgColor=code
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type="button" name="Button1" value="RED" onclick="changecolor('red')"/>
<input type="button" name="Button2" value="GREEN" onclick="changecolor('green')"/>
<input type="button" name="Button3" value="BLUE" onclick="changecolor('blue')"/>
<input type="button" name="Button4" value="WHITE" onclick="changecolor('white')"/>
</div>
</form>
</body>
</html>
<!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></title>
<script language="JavaScript" type="text/javascript">
function changecolor(code)
{
document.bgColor=code
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<input type="button" name="Button1" value="RED" onclick="changecolor('red')"/>
<input type="button" name="Button2" value="GREEN" onclick="changecolor('green')"/>
<input type="button" name="Button3" value="BLUE" onclick="changecolor('blue')"/>
<input type="button" name="Button4" value="WHITE" onclick="changecolor('white')"/>
</div>
</form>
</body>
</html>
No comments:
Post a Comment