新手请问dilicms 怎么在ajax写路径
在v层写了一个ajax传值,却发现一直找不到这个路径$.ajax({
type:'get',
url:'/dictionary/addShow' + $name,
dateType:'html',
success:function(date){
$('#SonArea').html(date);
}
})
dictionary 就是我的c文件, addShow是方法 将路径写到view中,
比如ajax提交表单数据时,url:$(form).attr("action"),
这时url就是直接从view中获取的。
当然也可以处理当前页的url(location.href),生成你想要的请求地址 比如ajax提交表单数据时,url:$(form).attr("action"),
页:
[1]