Chinaunix首页 | 论坛 | 博客
  • 博客访问: 30344
  • 博文数量: 9
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 105
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-17 16:09
文章分类
文章存档

2010年(2)

2008年(7)

我的朋友
最近访客

分类:

2008-04-17 16:52:06

HTML页面加载SVG



乱码解决方法

1、 设置SVG文档编码格式:encoding="utf-8";
2、 SVG文件的编码方式指定为utf-8,方法是用EditPlus打开SVG文件,文件->另存为 编码选择为utf-8即可以了;

基本的svgDOM树:




 
  
  This is a basic SVG document!
 



使用JAVASCRIPT访问SVG元素,并获取属性值



 
 
  
  Click on this text to show rectangle color.
  Click on rectangle to show rectangle area.
  Click on this text to show the number of child
   elements of the root element.
  

 



设置单个元素的属性值



 
 
  
  Click on rectangle to change it's color.
 

检查,并删除属性值



 
 
  

阅读(519) | 评论(0) | 转发(0) |
0

上一篇:Java文件操作

下一篇:Graphviz使用随记

给主人留下些什么吧!~~