Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法用变量设置 ajax url?
function ajaxDialog() { $.ajax({ url: url, type: "POST", DataType: "html" });
提前致谢!
您也可以使用变量作为参数。
var url=""; var var1 = "somevalue" function ajaxDialog() { $.ajax({ url: url, type: "GET", data:{ data1: var1 } }); }
小提琴