MVC中小试了一下Jquery

<!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>AjaxDemo</title>
    
<script src="http://www.cnblogs.com/Scripts/jquery-1.3.2-vsdoc.js" type="text/javascript"></script>
    
<script src="http://www.cnblogs.com/Scripts/jquery-1.3.2.js" type="text/javascript"></script>
    
<script type="text/javascript">
        $(document).ready(
function() {
            $(
"#button").click(ChangeColor);
            $(
"#Div1").hide();
        });
        
function ChangeColor() {
            AjaxDemo();
            $(
"#content").css("background-color""yellow");
        }
        
function AjaxDemo() {

            $(
"#content").ajaxStart(Start);
            $(
"#content").load("About"function() {
                $(
"#Div1").hide();
                FadeIn($(
this));
            });
        }
        
function Start() {
            $(
"#content").hide(); $("#Div1").show();
        
        }
        
function FadeIn(item) {
            item.fadeIn(
3000);
        }
    
</script>
</head>
<body>
    
<div>
    
<input type="button" value="Submit" id="button"/>
    
<div id="content" style="width:400px;height:300px;border-style:solid;
    border-width:1px;"
> </div>
    
<div id="Div1" style="width:400px;height:100px;border-style:solid;
    border-width:1px;background-color:Red"
>
    正在加载,请稍等 
</div>
    
    
</div>
</body>
</html>
posted @ 2009-09-04 11:01  Hawkon  阅读(166)  评论(0编辑  收藏  举报