Kinetic.js javascript不适用于Google Chrome,但适用于Mobile Safari

Kinetic.js javascript not working on Google Chrome but it is working on Mobile Safari

本文关键字:适用于 Mobile Safari Chrome Google js javascript 不适用 Kinetic      更新时间:2023-09-26

我有一个论坛弹出系统的代码,但该代码不适用于谷歌chrome,但它适用于移动safari。

document.getElementById('test').innerHTML="JAVASCRIPT IS FULLY FUNCTIONAL";
var w=window.innerWidth;
var h=Math.ceil(window.innerHeight/19);
var popup=new Kinetic.Stage({container:'notification',height:h,width:w});
var pla=new Kinetic.Layer();
var box=new Kinetic.Rect({x:0,y:0,width:w,height:h,fill:'#646362'});
pla.add(box);
avio=new Image();
avio.onload=function()
{
  var avi=new Kinetic.Image({x:3,y:3,image:avio,width:40,height:40});
  pla.add(avi);
  alert('test');
  popup.add(pla);
}
avio.src="testavi.png";

适用于Chrome27/Win7。

你有没有可能在Chrome Inspector中收到安全警报——可能是CORS?