2011-02-10 53 views
1

我试图让Internet Explorer Mobile 7显示Canvas。
我已经使用ExplorerCanvas和页面在IE7中工作(据我所知IE移动7是基于IE7)。可以在WP7中显示Canvas吗?

下面是代码:

<html> 
<head> 
    <title>Canvas Test</title> 
    <script type="text/javascript" src="excanvas.js"></script> 
    <script type="text/javascript"> 
    window.onload = function() { 
    var canvasElement = document.getElementById("canvas"); 
    var context = canvasElement.getContext("2d"); 
    context.fillStyle = "blue"; 
    context.fillRect(20,20,20,20); 
    } 
    </script> 
</head> 
<body> 
    <canvas id="canvas" width="100" height="100"/> 
</body> 
</html> 

是否有可能得到这个WP7上的工作?

回答

2

Windows Phone 7不支持HTML5,任何可能的手动实现(例如通过JavaScript)都不能保证能够正常工作。在你的情况下,你正在使用CANVAS标签 - 并且不支持。 Windows Phone 7上的IE更像IE 7.5(IE7和IE8的功能) - 但这只是移动设备上的一个子集。 WP7上的IE浏览器= Windows上的IE浏览器

+0

坏=(感谢 – 2011-02-10 23:16:33

+0

@Jimmy:尤其是移动IE 7不支持VML(或具有讽刺意味的是Silverlight)在其上ExplorerCanvas依靠做它的东西 – AnthonyWJones 2011-02-11 11:14:09

相关问题