How to call common.js

first step

The page needs to reference this js

second step

var loginJs = {
//登录
goLogin: function () {
var _userinfo = { name: "夏小沫", pwd: "123" };
var _addinfo = { Country: "北京", Street: "上地三街" };
Common.MyAjax.GetJsonByPost("/myinfo/GetInfo", JSON.stringify({ userinfo: _userinfo, addinfo: _addinfo }), false, function (data) {
try {
alert(data);
} catch (e) {
alert(e.message);
}
});
},
}

This is the method to call common.js, the method is very simple, common.js is equivalent to a class, you can call it directly.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325207177&siteId=291194637