Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function jsonp(url, callback, name, query)
- {
- if (url.indexOf("?") > -1)
- url += "&" + callback + "="
- else
- url += "?"+ callback +"="
- url += name + "&";
- if (query)
- url += encodeURIComponent(query) + "&";
- url += new Date().getTime().toString(); // prevent caching
- var script = document.createElement("script");
- script.setAttribute("src",url);
- script.setAttribute("type","text/javascript");
- document.body.appendChild(script);
- }
Add Comment
Please, Sign In to add comment