Onelong

分享知识,与你一起进步......
RSS icon Home icon
  • 如何禁用浏览器的右键菜单

    post by onelong / 2010-11-14 17:28 Sunday [javascript]

    有些时候我们需要自定菜单,假如无法禁用浏览器的右键菜单是无法实现的!不多说了!看下面的代码啦!

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    阅读全文>>

  • ActionScript3 修改右键菜单的方法

    post by onelong / 2010-4-14 23:15 Wednesday [MXML/ActionScript3.0]

    方法一:
    var zcd:ContextMenu=new ContextMenu();//上下文菜单
    zcd.hideBuiltInItems();//隐藏所有右键菜单
    zcd.builtInItems.print=true;//显示打印菜单
    this.contextMenu=zcd;

    方法二:
     var zcd:ContextMenu=new ContextMenu();//上下文菜单
    var nzcd:ContextMenuBuiltInItems=new ContextMenuBuiltInItems();
    nzcd.print=false;//隐藏打印菜单
    nzcd.quality=false;//隐藏品质菜单
    zcd.builtInItems=nzcd;
    this.contextMenu=zcd;

    this.stage.showDefaultContextMenu=false;//隐藏右键菜单

    方法三:
    var zcd:ContextMenu=new ContextMenu();//上下文菜单
    zcd.hideBuiltInItems();//隐藏所有右键菜单
    this.contextMenu=zcd;//重新赋值,改变右键菜单

    方法四:
    var zcd:ContextMenu=new ContextMenu();//上下文菜单
    zcd.builtInItems.print=false;//隐藏所有右键菜单
    this.contextMenu=zcd;

    自定义菜单:
     

    阅读全文>>