该 SVGElement 对象有这些类型的成员:
该 SVGElement 对象包含以下事件.
Event | Description |
---|---|
click |
当用户在当前对象上单击鼠标左键时触发。 Note Starting with IE11, this event fires a MSPointerEvent object instead of MouseEvent. You can use the MouseEvent.pointerType property to determine the type of contact that the click originated from (touch, mouse, or pen). |
dblclick |
当用户在当前对象上双击鼠标左键时触发。 Note Starting with IE11, this event fires a MSPointerEvent object instead of a MouseEvent. You can use the MouseEvent.pointerType property to determine the type of contact that the click originated from (touch, mouse, or pen). |
focusin |
当前对象设置为焦点前触发。 |
focusout |
焦点转移时立即触发。 |
load |
加载当前对象时触发。 |
mousedown |
当鼠标在当前对象上处于“压下”状态时触发。 |
mousemove |
当用户在当前对象上移动鼠标时触发。 |
mouseout |
当用户移动鼠标超过当前对象边界时触发。 |
mouseover |
当用户将鼠标移动到当前对象范围时触发。 |
mouseup |
当用户在当前对象上“释放”鼠标时触发(即鼠标按键弹起时)。 |
onabort |
图像完成载入之前停止图像的装载时触发。 |
onerror |
当一个元素不正确加载或脚本运行不正确时触发。 |
onload |
当浏览器已经完全解析所有元素和它所有的后代节点时触发。 |
onresize |
当文档视图的大小改变时触发。 |
onscroll |
当文档视图沿着X轴、Y轴或者沿着X、Y轴同时移动时触发。 |
onunload |
当文档从windows或者frame中移除时触发。 |
onzoom |
当文档缩放级别或currentScale 的属性发生变化时触发。 |
该 SVGElement 对象包含以下方法.
Method | Description |
---|---|
animationsPaused |
判断此SVG文档片段是否处于暂停状态。(true:暂停状态;否则,false。) |
checkEnclosure |
判断元素是否超出指定矩形范围。(true:未超出范围;否则,false。) |
checkIntersection |
判断元素是否与指定矩形相交。 |
createEvent |
Creates an event object to be used in conjunction with the dispatchEvent method. |
createSVGAngle |
Creates a new SVGAngle object that does not have units, that is set to 0 degrees, and that is not attached to any document. |
createSVGLength |
Creates a new SVGLength object that has a length of 0 user units. |
createSVGMatrix |
Creates a new SVGMatrix object that is set to the identity matrix and that is not attached to any document. |
createSVGNumber |
Creates a new SVGNumber object that has a value of zero and that is not attached to any document. |
createSVGPoint |
Creates a new SVGPoint object that is initialized to the point (0,0) in the user coordinate system and that is not attached to any document. |
createSVGRect |
Creates a new SVGRect object that has all values set to 0 user units and that is not attached to any document. |
createSVGTransform |
Creates a new SVGTransform object that is set to the identity matrix and that is not attached to any document. |
createSVGTransformFromMatrix |
Creates a matrix transform object whose values are given by the specified matrix. |
deselectAll |
Cancels the selection of any selected objects, including any selections of text strings and text boxes. |
forceRedraw |
Redraws all regions of the viewport that require updating. |
getBBox |
Gets the bounding box, in current user space, of the geometry of all contained graphics elements. |
getComputedStyle |
Returns the current computed value of the combined CSS properties for an element. |
getCTM |
Gets the transformation matrix that transforms from the current user units to the viewport coordinate system for the nearestViewportElement object. |
getCurrentTime |
Gets the current time, in seconds, relative to the start time for the current SVG document fragment. |
getElementById |
Gets the element that matches the specified ID from the SVG document or document fragment. |
getEnclosureList |
Gets the list of graphics elements whose rendered content is entirely contained within the specified rectangle. |
getIntersectionList |
Gets the list of graphics elements whose rendered content intersects the specified rectangle. |
getScreenCTM |
Gets the transformation matrix from the current user units to the screen coordinate system. |
getTransformToElement |
Gets the transformation matrix that transforms from the user coordinate system on the current element to the user coordinate system on the specified target element. |
hasExtension |
Determines if the specified extension is supported. |
pauseAnimations |
Pauses all currently running animations that are defined within the SVG document fragment that corresponds to this svg element. |
setCurrentTime |
Sets the new current time for this SVG document fragment. |
suspendRedraw |
Suspends redrawing a device for a specified duration. |
unpauseAnimations |
Resumes currently running animations that are defined within the SVG document fragment. |
unsuspendRedraw |
取消指定的暂停重绘操作。 |
unsuspendRedrawAll |
Cancels all currently active suspensions of redrawing operations. |
The SVGSVGElement object has these properties.
Property | Description |
---|---|
Gets the names of the classes that are assigned to this object. |
|
Sets or retrieves a reference to the SVG graphical object that will be used as the clipping path. |
|
Gets the default scripting language of the current document fragment. |
|
Gets the default style sheet language of the current document. |
|
Gets or sets the current scale factor, relative to the initial view (when this property is called from an outermost svg element. |
|
Gets or sets the current translation factor, relative to the initial view (when this property is called from an outermost svg element). |
|
Gets a value that indicates whether referenced resources that are not in the current document are required to correctly render a given element. |
|
Gets a value that represents the farthest ancestor svg element. |
|
Determines if an element can acquire keyboard focus (that is, receive keyboard events) and be a target for field-to-field navigation actions (such as when a user presses the Tab key). |
|
定义一个元素的高度。 |
|
Sets or retrieves a value that indicates a SVG mask. |
|
Gets a value that indicates which element established the current viewport. |
|
Gets the nearest ancestor svg element. |
|
Gets or sets the size of a pixel unit along the x-axis of the viewport. |
|
Gets or sets the size of a pixel unit along the y-axis of the viewport. |
|
Gets an XML value that indicates whether to force uniform graphic scaling. |
|
Gets a white space-delimited list of required language extensions. |
|
Gets or sets a white space-delimited list of feature strings. |
|
Gets or sets the size of a screen pixel along the x-axis of the viewport. |
|
Gets or sets the size of a screen pixel along the y-axis of the viewport. |
|
获取一个 style 对象。 |
|
按照逗号分隔符的方式获取或设置一组语言名称。 |
|
Gets or sets a value that indicates whether the current innermost SVG document fragment is the standard view (that is, based on attributes of the svg element such asviewBox) or a custom view (that is, a hyperlink into a particular view or other element. |
|
Gets a value that indicates how a graphic scales to fit a container element. |
|
获取或设置当前viewport。 |
|
Gets the element that established the current viewport. |
|
定义一个元素的宽度。 |
|
获取或者设置X轴坐标值。 |
|
获取或设置元素的基本属性。 |
|
获取或设置元素的语言属性。 |
|
Gets or sets a value that indicates whether white space is preserved in character data. |
|
获取或者设置Y轴坐标值。 |
|
获取缩放平移属性元素。 |
原文地址:http://msdn.microsoft.com/library/ff972122.aspx