<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FROZA &#187; 网页编程</title>
	<atom:link href="http://blog.thinklet.net/robert/category/%e7%bc%96%e7%a8%8b/%e7%bd%91%e9%a1%b5%e7%bc%96%e7%a8%8b/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.thinklet.net/robert</link>
	<description>Just another Thinklet.net Blogs weblog</description>
	<lastBuildDate>Sat, 04 Apr 2009 15:40:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>用jquery.form.js插件时，回调函数showResponse不起作用</title>
		<link>http://blog.thinklet.net/robert/2009/01/09/%e7%94%a8jqueryformjs%e6%8f%92%e4%bb%b6%e6%97%b6%ef%bc%8c%e5%9b%9e%e8%b0%83%e5%87%bd%e6%95%b0showresponse%e4%b8%8d%e8%b5%b7%e4%bd%9c%e7%94%a8/</link>
		<comments>http://blog.thinklet.net/robert/2009/01/09/%e7%94%a8jqueryformjs%e6%8f%92%e4%bb%b6%e6%97%b6%ef%bc%8c%e5%9b%9e%e8%b0%83%e5%87%bd%e6%95%b0showresponse%e4%b8%8d%e8%b5%b7%e4%bd%9c%e7%94%a8/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 17:19:38 +0000</pubDate>
		<dc:creator>robert</dc:creator>
				<category><![CDATA[网页编程]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://blog.thinklet.net/robert/?p=3</guid>
		<description><![CDATA[用jquery.form.js来做表单的ajax提交，从网上拷了代码下来以后，就调用处的代码没有做太多修改，结果发现success参数指定的showResponse回调方法没起作用。搜索了一把以后，发现是没有对dataType这个参数进行设置，现将options参数的详细解释作说明，以示警醒：
target：指明页面中由服务器响应进行更新的元素。元素的值可能被指定为一个jQuery选择器字符串，一个jQuery对象，或者一个DOM元素。
默认值：null。
url：指定提交表单数据的URL。
默认值：表单的action属性值
type：指定提交表单数据的方法（method）：“GET”或“POST”。
默认值：表单的method属性值（如果没有找到默认为“GET”）。
success：表单成功提交后调用的回调函数。如果提供“success”回调函数，当从服务器返回响应后它被调用。然后由dataType选项值决定传回responseText还是responseXML的值。
默认值：null
dataType（就是这里了）：期望返回的数据类型。null、“xml”、“script”或者“json”其中之一。dataType提供一种方法，它规定了怎样处理服务器的响应。这个被直接地反映到jQuery.httpData方法中去。下面的值被支持：
xml：如果dataType == &#8216;xml&#8217;，将把服务器响应作为XML来对待。同时，如果“success”回调方法被指定， 将传回responseXML值。
json：如果dataType == &#8216;json&#8217;， 服务器响应将被求值，并传递到“success”回调方法，如果它被指定的话。
script：如果dataType == &#8217;script&#8217;， 服务器响应将求值成纯文本。
]]></description>
			<content:encoded><![CDATA[<p>用jquery.form.js来做表单的ajax提交，从网上拷了代码下来以后，就调用处的代码没有做太多修改，结果发现success参数指定的showResponse回调方法没起作用。搜索了一把以后，发现是没有对dataType这个参数进行设置，现将options参数的详细解释作说明，以示警醒：</p>
<p><strong>target</strong>：指明页面中由服务器响应进行更新的元素。元素的值可能被指定为一个jQuery选择器字符串，一个jQuery对象，或者一个DOM元素。<br />
默认值：null。</p>
<p><strong>url</strong>：指定提交表单数据的URL。<br />
默认值：表单的action属性值</p>
<p><strong>type</strong>：指定提交表单数据的方法（method）：“GET”或“POST”。<br />
默认值：表单的method属性值（如果没有找到默认为“GET”）。</p>
<p><strong>success</strong>：表单成功提交后调用的回调函数。如果提供“success”回调函数，当从服务器返回响应后它被调用。然后由dataType选项值决定传回responseText还是responseXML的值。<br />
默认值：null</p>
<p><strong>dataType</strong>（就是这里了）：期望返回的数据类型。null、“xml”、“script”或者“json”其中之一。dataType提供一种方法，它规定了怎样处理服务器的响应。这个被直接地反映到jQuery.httpData方法中去。下面的值被支持：</p>
<p>xml：如果dataType == &#8216;xml&#8217;，将把服务器响应作为XML来对待。同时，如果“success”回调方法被指定， 将传回responseXML值。</p>
<p>json：如果dataType == &#8216;json&#8217;， 服务器响应将被求值，并传递到“success”回调方法，如果它被指定的话。</p>
<p>script：如果dataType == &#8217;script&#8217;， 服务器响应将求值成纯文本。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thinklet.net/robert/2009/01/09/%e7%94%a8jqueryformjs%e6%8f%92%e4%bb%b6%e6%97%b6%ef%bc%8c%e5%9b%9e%e8%b0%83%e5%87%bd%e6%95%b0showresponse%e4%b8%8d%e8%b5%b7%e4%bd%9c%e7%94%a8/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<a style="display: none;" href="http://mcinside.com/">MC Inside</a>