Ajax & SVG
最近作了很多试验,才发现,在SVG利用Ajax交互和在普通的网页中用Ajax交互不是同一个概念。如何更好的分配服务器和客户端的负荷~~。。such a long way to go.
dom标准规定一个document不能插入另外一个document的node。不同的frame/window里的 document自然是不同的。从一个document clone出来的(或者create出来的)是不能被append或者insert到其他document中的。当然,dom3增加了importNode方法,是可以用来导入其他document的node的。但是ie不支持(也许ie 7.0会支持)。在我做的试验里,ff还是支持两个不同的DOM树之间的appenchild操作的,但是opera和IE 6,就不是不行..郁闷:cry:
所以ff可以使用importNode这样高效率的dom方法,对于ie来说只能用innerHTML = serialize(otherNode)这样的方式。serialize方法把一个node串行化成字符串。在ie环境的具体实现上,对于XmlDocument,使用node.xml,对于HtmlDocument,使用node.outerHTML。
Related posts:
About this entry
You’re currently reading “Ajax & SVG,” an entry on Geoinformatics
- Published:
- 5.18.06 / 2下午
Ajax ArcGIS Dreams Flex Geography Geoinformatics GeoRSS GIS Google Hardware Harvard History Jquery Linux Love Map MapServer NASA OGC OpenGIS OSGeo PHP Politics PostGIS PostgreSQL Python R Social Network SVG Ubuntu Web WebGIS Wordpress 中国 历史地理 宋朝 开源 新儒学 生活 遥感
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.














赵 博 (Bo Zhao),
参与或主持的项目
No comments
Jump to comment form | comments rss [?] | trackback uri [?]