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

javascript to ajax(一)

AJAX 在浏览器与 Web 服务器之间使用异步数据传输(HTTP 请求),这样就可使网页从服务器请求少量的信息,而不是整个页面。
AJAX 基于 Web 标准
AJAX 基于下列 Web 标准:
JavaScript
XML
HTML
CSS
在 AJAX 中使用的 Web 标准已被良好定义,并被所有的主流浏览器支持。AJAX 应用程序独立于浏览器和平台。
Deafault.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="XmlWeb._Default" %>
<!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 id="Head1" runat="server">
    <title>无标题页</title>
    <script language="javascript" type="text/javascript">
        function ajaxFunction() {
            var xmlhttp;
            try {
                xmlhttp = new XMLHttpRequest();
            }
            catch (e) {
                try {
                    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
                }
                catch (e) {
                    try {
                        xmlht


相关文档:

通过javascript获得url参数

页面提交数据一般有两种方法:get,post。post就是所谓的form提交,使用视图;get是通过url提交。
Get方法一般用后台代码(如asp,asp.net)获得参数,代码很简单:Request.QueryString["id"];即可获取。 
有些时候需要直接在前台获取url参数,要用到javascript,js没有直接获取url参数的方法,那么,我们如何通过js ......

javascript学习日志二

1、运算符++为累加,若x=5,y=++x,则y=6;运算符- -为递减,若x=5,y=--x,则y=4
2、条件运算符:greeting=(visitor= =”PRES”)?”Dear President”:”Dear”;
如果变量visitor中的值是“PRES”,则向变量greeting赋值“Dear President”,否则赋值“Dear” ......

jQuery Ajax 实例演示


<html>
<head>
<title>jQuery Ajax 实例演示</title>
</head>
<script language="javascript" src="../lib/jquery.js"></script>
<script language="javascript">
$(document).ready(function ()
{
   $('#send_ajax').click(function (){
 &nb ......

jquery Ajax 传递汉字到 servlet 时出现乱码的问题


jquery Ajax 传递汉字到 servlet 时出现乱码的问题
2009年11月25日 星期三 下午 02:28
jquery Ajax 传递汉字到 servlet 时出现乱码的问题
在js中对需要的传送的参数进行编码
encodeURI(encodeURI(param))
在服务器接受后对其进行解码
String param = URLDecoder.decode(request.getParameter("param"),"utf-8");
......

Javascript CSS记事

注:"elm"代表某个DOM元素,"xxx"代表某个CSS属性
一、elm.style.xxx  只能获取内联样式里的值
要想获得正确的css值:
IE:elm.currentStyle[xxx]
W3C标准:document.defaultView.getComputedStyle(elm,"")[xxx]
注意:用IE方法返回值可能不是数字,而是auto;用w3c的方法总是会返回数字+单位
三、offsetLeft
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号