<?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>Erick &#187; Javascript</title>
	<atom:link href="http://blog.xiongchuan.org/category/tech/javascript/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.xiongchuan.org</link>
	<description>Even a great life is only a life until you make it.</description>
	<lastBuildDate>Thu, 10 Mar 2011 14:44:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
	
<!-- Start Of Script Generated By WP-PostViews Plus -->
<script type='text/javascript' src='http://blog.xiongchuan.org/wp-includes/js/jquery/jquery.js?ver=1.4.4'></script>
<script type="text/javascript">
/* <![CDATA[ */
/* ]]> */
</script>
<!-- End Of Script Generated By WP-PostViews Plus -->
	<item>
		<title>Form表单的submit()，IE6下提交不了的解决办法</title>
		<link>http://blog.xiongchuan.org/javascript-form-submit-ie6.html</link>
		<comments>http://blog.xiongchuan.org/javascript-form-submit-ie6.html#comments</comments>
		<pubDate>Sun, 13 Jun 2010 05:07:26 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[ie6]]></category>

		<guid isPermaLink="false">http://www.pigblog.net/?p=625</guid>
		<description><![CDATA[今天遇到IE6下的submit不好使，baidu之后留下来了。 一般在A标签下面， $('submitA').onclick = function(){ $('formId').submit(); } 如果你的写法像上面一样， 这时候会发现IE6下面提交不了表单。解决的办法有两种 一、把A标签换个写法 把其中的javascript:void(0)换成#就可以了 二、在javascript里面，对submit动作处理一下 $('submitA').onclick = function(){ setTimeout(function(){$('formId').submit();},0); } Most Commented Posts发一个dedeEIMS企业模板Guestbook博客终于恢复啦MySQL Can&#8217;t find messagefile,解决方法2010沉默几天武汉的这个六月搬家啦,上班不怕迟到了……About]]></description>
			<content:encoded><![CDATA[<p>今天遇到IE6下的submit不好使，baidu之后留下来了。<br />
一般在A标签下面，</p>
<blockquote><pre name="code" class="html"><a href="javascript:void(0)" id="submitA"></a>

$('submitA').onclick = function(){
    $('formId').submit();
}</blockquote>

如果你的写法像上面一样，
这时候会发现IE6下面提交不了表单。解决的办法有两种
<blockquote>
一、把A标签换个写法
<pre name="code" class="html"><a href="#" id="submitA"></a></pre>
<p>把其中的javascript:void(0)换成#就可以了</p></blockquote>
<blockquote><p>二、在javascript里面，对submit动作处理一下<br />
$('submitA').onclick = function(){<br />
    setTimeout(function(){$('formId').submit();},0);<br />
}</p></blockquote>
<h4  class="entry-title">Most Commented Posts</h4><ul class="related_post"><li><a href="http://blog.xiongchuan.org/an-enterprise-theme-for-dedeeims.html" title="发一个dedeEIMS企业模板">发一个dedeEIMS企业模板</a></li><li><a href="http://blog.xiongchuan.org/guestbook" title="Guestbook">Guestbook</a></li><li><a href="http://blog.xiongchuan.org/blog-recovery-again.html" title="博客终于恢复啦">博客终于恢复啦</a></li><li><a href="http://blog.xiongchuan.org/cant-find-messagefile-resolve.html" title="MySQL Can&#8217;t find messagefile,解决方法">MySQL Can&#8217;t find messagefile,解决方法</a></li><li><a href="http://blog.xiongchuan.org/2010-bad-day.html" title="2010沉默几天">2010沉默几天</a></li><li><a href="http://blog.xiongchuan.org/these-days-in-wuhan.html" title="武汉的这个六月">武汉的这个六月</a></li><li><a href="http://blog.xiongchuan.org/move-house.html" title="搬家啦,上班不怕迟到了……">搬家啦,上班不怕迟到了……</a></li><li><a href="http://blog.xiongchuan.org/about" title="About">About</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.xiongchuan.org/javascript-form-submit-ie6.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>jQuery,callback&#124;回调函数的问题</title>
		<link>http://blog.xiongchuan.org/jquery-callback-function-something.html</link>
		<comments>http://blog.xiongchuan.org/jquery-callback-function-something.html#comments</comments>
		<pubDate>Wed, 07 Oct 2009 06:44:29 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[回调函数]]></category>

		<guid isPermaLink="false">http://www.pigblog.net/?p=307</guid>
		<description><![CDATA[用jquery一直都是用的异步传输，习惯了，今天在做表单提交验证一个字段的惟一性的时候，同样是用了异步，问题就出现了。 var checkwap=function(){ var total; $.ajax({ url:'bsmajax.php?type=checkwap', type:'GET', async:false,//原来是true, cache:false, data :{wapnum:$('input[id=wapnum]').val()}, dataType :'json', success :function(json){ total=json.total; } }); return total; }; alert(checkwap());//开始的时候怎么也得不到值，以为是jquery关于变量作用域的访问问题 多加了几个alert();后才觉悟，因为是异步的，alert(checkwap());先执行了，等ajax成功返回数据后total才有值。 因为在表单提交的验证是要实时的，所以就 async:false 了，变成同步的。 当我以为是变量作用域问题时，在GOOGLE里搜索时，也有人犯这样的迷糊，现在记下来。 Related Postsjavascript学习AJAX五步走,POST方法学习手记]]></description>
			<content:encoded><![CDATA[<p>用jquery一直都是用的异步传输，习惯了，今天在做表单提交验证一个字段的惟一性的时候，同样是用了异步，问题就出现了。</p>
<pre name="code" class="javascript">
	var checkwap=function(){
		var total;
		$.ajax({
			url:'bsmajax.php?type=checkwap',
			type:'GET',
			async:false,//原来是true,
			cache:false,
			data :{wapnum:$('input[id=wapnum]').val()},
			dataType :'json',
			success :function(json){
				total=json.total;
			}
		});
		return total;
	};
alert(checkwap());//开始的时候怎么也得不到值，以为是jquery关于变量作用域的访问问题
</pre>
<p>多加了几个alert();后才觉悟，因为是异步的，alert(checkwap());先执行了，等ajax成功返回数据后total才有值。<br />
因为在表单提交的验证是要实时的，所以就 async:false 了，变成同步的。</p>
<p>当我以为是变量作用域问题时，在GOOGLE里搜索时，也有人犯这样的迷糊，现在记下来。</p>
<h4  class="entry-title">Related Posts</h4><ul class="related_post"><li><a href="http://blog.xiongchuan.org/javascript-study.html" title="javascript学习">javascript学习</a></li><li><a href="http://blog.xiongchuan.org/to-study-ajax-follow-me.html" title="AJAX五步走,POST方法学习手记">AJAX五步走,POST方法学习手记</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.xiongchuan.org/jquery-callback-function-something.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dopost is not a function 解决</title>
		<link>http://blog.xiongchuan.org/dopost-is-not-a-function-resove.html</link>
		<comments>http://blog.xiongchuan.org/dopost-is-not-a-function-resove.html#comments</comments>
		<pubDate>Sat, 03 Oct 2009 07:07:48 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[dedecms]]></category>
		<category><![CDATA[函数]]></category>

		<guid isPermaLink="false">http://www.pigblog.net/?p=291</guid>
		<description><![CDATA[今天在修改dedecms的时候，js里给一个元素定义了一个方法 var dopost=function(){} FF下面debug的时候，奇怪的报dopost is not a function,实际上是已经定义了。 找了半天才知道，dedecms里面有一个隐藏input 它的name=dopost，就是这个原因，命名冲突了 只要把定义的方法改个名字 var doajax=function(){} 就OK了。 Related Posts博客归来，更简洁了发一个dedeEIMS企业模板给博客加个作者&#124;wordpress作者函数Biolab.cn]]></description>
			<content:encoded><![CDATA[<p>今天在修改dedecms的时候，js里给一个元素定义了一个方法<br />
var dopost=function(){}<br />
FF下面debug的时候，奇怪的报dopost is not a function,实际上是已经定义了。<br />
找了半天才知道，dedecms里面有一个隐藏input 它的name=dopost，就是这个原因，命名冲突了<br />
只要把定义的方法改个名字<br />
var doajax=function(){}<br />
就OK了。</p>
<h4  class="entry-title">Related Posts</h4><ul class="related_post"><li><a href="http://blog.xiongchuan.org/blog-back.html" title="博客归来，更简洁了">博客归来，更简洁了</a></li><li><a href="http://blog.xiongchuan.org/an-enterprise-theme-for-dedeeims.html" title="发一个dedeEIMS企业模板">发一个dedeEIMS企业模板</a></li><li><a href="http://blog.xiongchuan.org/add-author-name-for-wordpress.html" title="给博客加个作者|wordpress作者函数">给博客加个作者|wordpress作者函数</a></li><li><a href="http://blog.xiongchuan.org/biolab-cn-dedecms-template.html" title="Biolab.cn">Biolab.cn</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.xiongchuan.org/dopost-is-not-a-function-resove.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>javascript学习</title>
		<link>http://blog.xiongchuan.org/javascript-study.html</link>
		<comments>http://blog.xiongchuan.org/javascript-study.html#comments</comments>
		<pubDate>Mon, 28 Sep 2009 15:19:22 +0000</pubDate>
		<dc:creator>Erick</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.pigblog.net/?p=288</guid>
		<description><![CDATA[终于在目录里增加了这一分类，js的经验都是在改站的过程中积累的，对DOM有一定了解，现在学习了jQuery的官方手册HTML版本，觉得挺好，没钱买书看，不知道是否有差距。以后将多研究下JS。 Related PostsjQuery,callback&#124;回调函数的问题]]></description>
			<content:encoded><![CDATA[<p>终于在目录里增加了这一分类，js的经验都是在改站的过程中积累的，对DOM有一定了解，现在学习了jQuery的官方手册HTML版本，觉得挺好，没钱买书看，不知道是否有差距。以后将多研究下JS。</p>
<h4  class="entry-title">Related Posts</h4><ul class="related_post"><li><a href="http://blog.xiongchuan.org/jquery-callback-function-something.html" title="jQuery,callback|回调函数的问题">jQuery,callback|回调函数的问题</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://blog.xiongchuan.org/javascript-study.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

