AJAX中DragPanelExtender扩展控件
页面代码:
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Panel ID="Panel1" runat="server" Height="170px" Width="242px">
<asp:Panel ID="Panel2" runat="server" Height ="18px">
<div style="background-image:url(image/AjaxMenuBg2.gif); background-repeat:repeat-x; color:White">我可以移动</div>
</asp:Panel>
<asp:TextBox ID="TextBox1" runat="server" Height="134px" Width="232px"></asp:TextBox></asp:Panel>
<cc1:DragPanelExtender ID="DragPanelExtender1" runat="server"
TargetControlID="Panel1"
DragHandleID="Panel2"
>
</cc1:DragPanelExtender>
</div>
<script type="text/javascript">
function setBodyHeightToContentHeight() {
document.body.style.height = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight)+"px";
}
setBodyHeightToContentHeight();
&nbs
相关文档:
<script language="javascript" type="text/javascript">
function doubleSalary()
{
var employee = new Object();
employee.FirstName = "X";
employee.LastName = "PP";
employee.Salary = 1000;
......
用的标签有ScriptManager,UpdatePanel,UpdateProgress ,主要的是UpdatePanel中的Triggers属性一定要对。
前台代码
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdateP ......
用Ajax实现Tab效果的
先创建
ajax.php,在其中输入如下代码:
<!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>
<title>Sample 2_1</title>
<me ......
如上图所示的等级控件(这个控件主要指定样式):
页面代码:
<head runat="server">
<title>无标题页</title>
<mce:style type ="text/css"><!--
.ratingStar
{
font-size:0pt;
width:15px;
height:12px;
......
/*在有中文参数时,接收方需要使用UTF-8方式对数据进行解码
*不支持post附件
*/
function getXmlHttpRequest() {
var xmlHttpRequest = null;
try {
xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
} ......