AJAX扩展控件Accordion的使用方法总结
如上图所示为Accordion控件:
感觉不错的样式
<style type="text/css">
.headerBg{cursor:hand;text-align:center;width:180px;height:21px;background-image:url(images/ajaxmenubg1.gif);FONT-SIZE: 12px;line-height:21px;}
.contentBg{width:180px;text-align:left;BACKGROUND-COLOR: #D1ECC8; FONT-SIZE: 12px; Font-color: #669900; FONT-FAMILY: "宋体"}
</style>
</head>
一、静态加载:
页面代码如下:
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<cc1:Accordion ID="Accordion1" runat="server" Height="329px" Width="198px"
HeaderCssClass ="accordionHeader"
ContentCssClass ="accordionContent"
FadeTransitions ="true"
TransitionDuration ="300"
FramesPerSecond ="20"
RequireOpenedPane ="false"
SelectedIndex ="-1"
>
<Panes>
<cc1:AccordionPane runat ="server">
<Header>张佳佳</Header>
<Content>态度决定一切</Content>
</cc1:AccordionPane>
<cc1:AccordionPane ID="AccordionPane1" runat ="server">
<Header>*佳佳*</Header>
<Content>太阳像往常一样升了起来</Content>
</cc1:AccordionPane>
<cc1:AccordionPane ID="AccordionPane2" runat ="server">
<Header>i++</Header>
<Content>做好自己该做的!</Content>
</cc1:AccordionPane>
<cc1:AccordionPane ID="AccordionPane3" runat
相关文档:
Ajax中的返回状态readyState和status,原来没有重视过这两者的关系,结果今天写代码时出差错了。我的原代码为:
function requestSome()
{
url=......
xmlHttpRequest.open....
xmlHttpRequest.onreadystatechange = function responseSome();
xmlHttpRequest.send....
}
function resp ......
function saveObj(){
var userName = document.getElementById("userName").value;
checkUserName(userName);
}
//使用ajax实现页面无刷新功能;
var xmlHttpRequest;
function createXMLHttpRequest(){
if(windo ......
<script language="javascript" type="text/javascript">
function doubleSalary()
{
var employee = new Object();
employee.FirstName = "X";
employee.LastName = "PP";
employee.Salary = 1000;
......
原来用jQuery的ajax方式调用asp.net页面基本都是调用单个页面,由调用页面Response内容,而现在采用asp.net ajax后,我们则可以更完美的使用jQuery和asp.net结合了,代码如下:
<asp:ScriptManager ID="ScriptManager1" runat="server" >
<Scripts>
<asp:ScriptReference Path="http ......
在使用jQuery 的Ajax加载数据是 如果使用get方式传递参数则存在一下问题
firefox下传递数据正常
ie下则会出现缓存问题
解决方法:
1、http://yourwebsite?parseInt(Math.random() * 1000) 在url后面加上一个随即数,这样每次发送的就不一样了,而且不影响你的功能.
2、使用post传递参数
......