<!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"
>
    正在加载,请稍等MVC中小试了一下Jquery 
</div>
    
    
</div>
</body>
</html>

相关文章:

  • 2021-06-22
  • 2021-10-03
  • 2021-07-04
  • 2021-07-29
  • 2021-08-18
  • 2021-08-17
  • 2021-07-01
  • 2021-08-16
猜你喜欢
  • 2021-12-17
  • 2021-10-31
  • 2021-12-06
  • 2022-12-23
  • 2021-04-07
  • 2022-12-23
相关资源
相似解决方案