escape在js里会使用utf8编码,而encodeURIComponent而直接可以被rails所识别,所以要编码中文,就使用encodeURIComponent。参考:[url]http://www.caiwangqin.com/post/179[/url]