//id 和 goods_id 为俩个参数var id = $(this).next().val();var goods_id = 1;var url = \"{:url(\'index/index\',[\'id\'=>\'canshu\',\'goods_id\'=>\'cancan\'])}\";//这里 需要把url中的参数替换一下url = url.replace(\'canshu\',id);url = url.replace(\'cancan\',goods_id);window.location.replace(url);