我想实现一个很简单的功能,就是把数据库里的某些数据显示在SVG里,请问怎样显示?
我想实现一个很简单的功能,就是把数据库里的某些数据显示在SVG里,请问怎样显示?
我用下面的代码在IE里通过了,可是在FireFox里怎么也不行,只是显示文字,图片出不来。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>SVG</title>
</head>
<body>
<object type="image/svg+xml" data="svg.asp?.svg" width="300" height="200">
<img src="NonSVG.gif" alt="SVG Image's Static Text" />
</object>
</body>
</html>
其中svg.asp文件内容如下:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<%
DBPath = "Peter Lee is a good boy!"
%>
<svg width="300" height="100" xmlns="http://www.w3.org/2000/svg">
<rect x="25" y="10" width="280" height="50"
fill="red" stroke="blue" stroke-width="3"/>
<text x="20" y="50" font-size="20">
<%=DBPath%>
</text>
</svg>
问题点数:20、回复次数:2Top
1 楼hunyuan(混元灵通)回复于 2006-07-15 20:34:18 得分 10
据说FireFox已经支持SVG了,没找到插件啊,郁闷!Top
2 楼ccnu425()回复于 2006-07-15 20:56:04 得分 10
firefox最新版有自带的svg显示功能,
不用插件就可以了,
IE没有,需要到adobe公司去下载svg浏览插件。Top




