a = b'\x00\x01'
ra = repr(a) # ra == "b'\\x00\\x01'"
assert invert_repr(ra) == a
invert_repr的正确形式是什么? string_escape& unicode_escape?
答案 0 :(得分:3)
使用var submit = {
preloader_id: "",
send:function (form_id) {
var _this = this; // store here
var url = $(form_id).attr("action");
$.ajax({
type: "POST",
url: url,
data: $(form_id).serialize(),
dataType: 'json',
success:(result) => {},
error: function(result) {
// Some errors
},
beforeSend: function() {
// use here...
console.log(_this.preloader_id);
if (_this.preloader_id != "") {
run_preloader(_this.preloader_id);
}
},
completes: function() {
// and here...
if (_this.preloader_id != "") {
run_preloader(_this.preloader_id, 'true');
}
}
});
}
}
或同等效果:
eval