随笔分类 - js
摘要:function addLink() { let body_element = document.body; let selection = window.getSelection(); let locationHref = document.location.href; let appendLin
        阅读全文
                
摘要://用于登录过期之后回到登录页 $.ajaxSetup({ complete:function(XMLHttpRequest,textStatus){ if(textStatus=="parsererror"){ window.location.href = '/'; } else if(textS
        阅读全文
                
摘要:一般不做特别设置登录失效会在小窗口弹出登录页面,这样影响整体视觉效果,所以在登录添加判断当前是否是在父窗口 if (top.location.href.indexOf("login") 1) { top.location.href = '/'; }
        阅读全文
                
摘要:{{# layui.each(d.roles, function(index, item){ }} <span class="layui-badge layui-bg-blue">{{ item.roleName}}</span> {{# }); }}
        阅读全文
                
摘要:$.ajax({ type: "POST", url:"url", data:$('#form').serialize(),// 序列化表单值 async: false, error: function(request) { //失败的话 }, success: function(data) { }
        阅读全文
                
摘要:function copyToClipboard(s){ if(window.clipboardData){ window.clipboardData.setData('text',s); }else{ (function(s){ document.oncopy=function(e){ e.cli
        阅读全文
                
摘要:$.ajax({ type: 'POST', url: "url", data: { appName: appName, op: appStatus }, dataType: "JSON", success:function(res) { console.log(res); $("#status"+
        阅读全文
                
 
                    
                
 浙公网安备 33010602011771号
浙公网安备 33010602011771号