2007年10月9日 星期二

VML

http://msdn2.microsoft.com/en-us/library/bb264280.aspx

try something about vml, and show it over screen.

e.g.

<html>
<head>
<script language=javascript>
function myInit() {
var div = document.getElementById('test');

// for ie only
document.namespaces.add("v", "urn:schemas-microsoft-com:vml");
document.createStyleSheet().addRule("v\\:*", "behavior:url(#default#VML)");

var oval = document.createElement('v:oval');
oval.style.width = "0.5in";
oval.style.height = "0.5in";
oval.style.left = "4.62in";
oval.style.top = "9.2in";
oval.fillcolor = "yellow";
div.appendChild(oval);

var rect = document.createElement('v:rect');
rect.style.width = "0.5in";
rect.style.height = "0.5in";
rect.style.left = "4.62in";
rect.style.top = "9.2in";
rect.fillcolor = "blue";
div.appendChild(rect);

var polyline = document.createElement('v:polyline');
polyline.style.position = "absolute";
polyline.style.top = "100";
polyline.points = "0 30,100 19,200 50,300 20,400 22,500 5,600 100,700 80,800 6,900 1";
polyline.filled = 0;
div.appendChild(polyline);

polyline = document.createElement('v:polyline');
polyline.style.position = "absolute";
polyline.style.top = "300";
polyline.points = "0 30,100 19,200 50,300 20,400 22,500 5,600 100,700 80,800 6,900 1";
polyline.filled = 0;
div.appendChild(polyline);
}
</script>
</head>
<body onload="myInit();">
<div id=test style='width:500;height:500;overflow:auto'></div>
</body>
</html>

沒有留言: