会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Avlee's Blog
只发表自己可以证实的言论,永远不要与人争论口味和颜色。
博客园
首页
新随笔
联系
订阅
管理
Adobe SVG Viewer 6.0 中自定义右键菜单
<?
xml version="1.0" encoding="UTF-16"
?>
<!
DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN"
"http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd" [
<!ENTITY st0 "display:none;fill:none;stroke:#AD0012;stroke-width:2;"
>
]>
<
svg
xml:space
="preserve"
width
="400"
height
="400"
>
<
desc
>
draw view
</
desc
>
<
defs
>
<
menu
id
="myContextMenu"
>
<
header
>
Custom Menu
</
header
>
<
item
onactivate
="showHelp()"
>
帮助
</
item
>
<
item
id
="About"
action
="About"
>
关于 Adobe SVG Viewer
</
item
>
</
menu
>
</
defs
>
<
script
>
<![CDATA[
var newMenuRoot = parseXML( printNode( document.getElementById( 'myContextMenu' ) ), contextMenu );
contextMenu.replaceChild( newMenuRoot.firstChild, contextMenu.firstChild );
function showHelper()
{
alert('help');
}
]]>
</
script
>
<
rect
x
="0"
y
="0"
width
="400"
height
="400"
rx
="10"
ry
="10"
style
="fill:none;stroke:#006300;stroke-width:1;"
/>
<
text
x
="100"
y
="100"
style
="font-family:'SimHei',sans-serif;pointer-events:none"
>
自定义右键菜单
</
text
>
</
svg
>
发表于
2005-03-15 13:04
Avlee
阅读(
3323
) 评论(
5
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部
公告