var project = { url : 'http://localhost:8080', visit : function (type){ jquery.ajax({ type : 'post', url : '/visit/view/' + type, cache : false, //data : {"idisplaystart":"0","idisplaylength":"10"}, datatype : 'json', success : function(data) { console.log('success'); }, error : function() { console.log("error") } }) } }; function getquerystring(name) { var reg = new regexp("(^|&)"+ name +"=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if(r!=null)return unescape(r[2]); return null; } jquery(document).ready(function ($) { });