[英]How to post and get comment using laravel ajax without reload page?
[英]How to reload page using Ajax
我有addFeaturesToScene
函数,它使用ajax创建一个新的URL。
功能结束后,我需要自动转到新站点
这是代码:
function addFeatureToScene(featureNid, sceneNid)
{
alert(featureNid + " -> " + sceneNid);
$.ajax({
type : 'GET',
url : '/copy-feature-and-add-it-to-scene/' + featureNid + '/' + sceneNid,
dataType : 'json',
async : false,
success : function(reply) {
//Code to open a page with a new url?
}
});
}
您可以使用window.location
window.location.href = 'http://example.org';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.