SVG Script Programming Introduction (1) This article mainly introduces SVG's scripting programming, and gives examples such as amplification, reduction, query, mouse events, respectively.
First, SVG introduction
SVG, a total called Scalable Vector Graphics (scalable vector graphics). It is W
3C
Developed, with vector descriptions of XML application standards. It has many advantages, such as scalable, dynamic, interactive. SVG supports unstretched, the magnification of the SVG picture is not impairing the display of the picture (not too many distortion), and other images such as BMP, JPEG format do not support stepless zoom. SVG has animation elements, as long as the SVG animation element is embedded in the SVG file, you can achieve an animation effect. At the same time, SVG also defines a wealth of events, including mouse events and keyboard events, as long as SVG performs scripting, the interaction of the SVG file can be implemented.
SVG has many basic graphical elements, as long as the SVG file can be constructed by combining basic graphic elements.
Second, SVG scripting programming
In SVG, some complicated interactions can be implemented by scripting. SVG is inserted into the script in the SVG document with the