问题如下:两个不同的网站A和B,B实现了简单的用户名密码登陆功能。现要实现从A网站完成B网站的自动登录功能,还望各位大虾不吝赐教~!关于技术范畴没有明显的要求。

解决方案 »

  1.   

    参考下单点登录
    http://www.cnblogs.com/wenanry/archive/2009/08/06/1540777.html
      

  2.   

    参见:http://www.easyui.org.cn/#xRequest
    xRequest:function(url,id){//取跨域数据,目标url,script标签id,省略则自动生成随机id
    id = id||'oscript'+Math.random().toString().replace(/\./g,'');
    var oScript = document.getElementById(id),head = document.getElementsByTagName("head").item(0);
    if (oScript){head.removeChild(oScript);}
    oScript = document.createElement("script");
    oScript.setAttribute("src", url);
    oScript.setAttribute("id",id);
    oScript.setAttribute("type","text/javascript");
    oScript.setAttribute("language","javascript");
    head.appendChild(oScript);
    return oScript;
    }