易截截图软件、单文件、免安装、纯绿色、仅160KB

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


相关文档:

Ajax无刷新自动发送邮件

应项目需求,测试了下自动发送邮件的功能,以实现,下面分别介绍前台的Ajax和后台c#
前台:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SendEmail.aspx.cs" Inherits="SendEmail" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1- ......

最简单的Ajax例子

<input type="button" onclick="ajaxTest()" value="AJAX测试">
<input type="button" onclick=" document.getElementById('weather').innerHTML='' " value="隐藏">
<mce:script type="text/javascript"><!--
// 1. 初始化 请求 对象
// Mozilla/Firefox 下的
//var xmlhttp = ne ......

PHP+Ajax实现Tab效果

用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 ......

Ajax的post方法的使用

刚开始学Ajax,看到很多网上的代码都用Get方法提交参数,Tomcat默认ISO编码实在是让人头痛,对付乱码我都是用过滤器做字符编码过滤的,Get方法过滤器监听不到,所以我一直喜欢使用Post方法,下面对Ajax Get和Post方法做一对比
GET:
view plaincopy to clipboardprint?
<mce:script type="text/javascript"><!- ......

ajax XMLHttpRequest post get

/*在有中文参数时,接收方需要使用UTF-8方式对数据进行解码
*不支持post附件
*/
function getXmlHttpRequest() {
    var xmlHttpRequest = null;
    try {
        xmlHttpRequest = new ActiveXObject("Msxml2.XMLHTTP");
    } ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号