
前端
LaughingSister
这个作者很懒,什么都没留下…
展开
-
js encodeURI转义特殊字符
遇到包含特殊字符的,如#、空格、加号$("#"+key).attr("src",ob[key].replace(/&/g,'%26').replace(/\+/g,'%2B').replace(/\s/g,'%20').replace(/#/g,'%23'); );原创 2022-01-07 16:16:00 · 934 阅读 · 0 评论 -
errorThrown:ReferenceError: data is not defined
ajax请求error:function(jqXHR,textStatus,errorThrown){ console.log(jqXHR.); console.log(textStatus); console.log(errorThrown);}error函数出现errorThrown:ReferenceError: data is not defined的错误。经排查出现这个问题的原因是由于datatype引起的datatype:“json”改为datatype:“text原创 2021-10-28 13:49:49 · 3507 阅读 · 0 评论 -
No ‘Access-Control-Allow-Origin‘ header is present on the requested resource. Origin ‘null‘ is there
js跨域访问原创 2021-10-25 11:31:05 · 121 阅读 · 0 评论 -
jquey ajax请求
$.ajax({ url: "/GZ_BAPI_CLASS_GETDETAIL/localjson?IV_EQUIPMENT="+Equip_Code, type: "post", //async: false, dataType:'json', success: function(res) { if (res["ct_objectdata"] != "") { var data = res["ct_objectdata"...原创 2021-03-23 15:05:05 · 103 阅读 · 0 评论 -
前端遮罩效果
var layer=$('<div id="layer" style="width:1999px ;height: 1999px;position: absolute;top:0;left:0;right:0;bottom:0;background: rgba(0,0,0,0.5);"> '+ '<div id="circle1" style="position: absolute;top: 10%;left: 20%;margin-top: -55px;">&l原创 2021-01-18 16:53:56 · 759 阅读 · 0 评论