摘要:
function addScript(url){ var script = document.createElement('script'); script.setAttribute('type','text/javascript'); script.setAttribute('src',url); 阅读全文
摘要:
比如有 A、B两个服务,对应的域名不同,A服务引用了B服务的 js,B 服务读取了自己域名下的cookie,然后返回给A 服务,该如何实现。 代码其实也不复杂,这里只简单说一下原理。 A 服务定义一个方法,必须包含一个参数,比如: function successLogin(respon) { va 阅读全文
摘要:
正常情况下,mysql 的 replace into 功能,也可以通过insert ignore 或者 if not exists 等关键词替代实现 然而,在oscar 数据库里,replace 不能使用,而且 ignore 或 if 等关键词 它也不认 最终研究发现,得用 MERGE INTO 比 阅读全文