<!DOCTYPE html> <html> <head> <title>帆软</title> <script> function load() { var password = decodeURIComponent(getQueryVariable('password')); var userName = decodeURIComponent(getQueryVariable('userName')); if(password && userName){ var scr = document.createElement("iframe"); scr.src = "http://localhost:8075/webroot/decision/login/cross/domain?fine_username="+userName+"&fine_password="+password+"&validity=-2&callback=" if(!scr.attachEvent){ scr.onload = function() { window.location ="http://localhost:8075/webroot/decision"; } } } document.getElementsByTagName("head")[0].appendChild(scr); }
function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split('&'); for(var i=0;i<vars.length;i++){ var pair = vars[i].split("="); if(pair[0] = variable){ return pair[1]; } return false; } } </script> </head> <body onload="load()"> </body> </html> 这是我的代码,现在就是直接跳到登录页面 |