约 100 字 预计阅读 1 分钟
- 重写方法
XMLHttpRequest.prototype.send
1
2
3
4
5
6
7
8
9
10
11
|
XMLHttpRequest.prototype._send = XMLHttpRequest.prototype.send
XMLHttpRequest.prototype.send = function (params) {
var attached_params = mdcUtil.MDC_DEVICE_ID + "=" + mdcUtil.getMdcDeviceId();
if (params) {
params += "&" + attached_params;
} else {
params = attached_params;
}
return this._send(params)
}
|