The oncommand attribute is key, because it establishes what happens when the user selects the menu item.
oncommand属性非常关键,因为它可以确定当用户选择菜单项时发生什么操作。
Notice the added script element within window, and the added attribute on the "Go!" button— oncommand="change_url(event)".
注意window内新增的script元素,以及对 “Go!”按钮添加的属性 —oncommand="change_url(event)"。
Others are special to XUL, like grippyhidden (which stops a menu bar from being hidden by the user) and oncommand (which is an event handler that fires when a menu option is chosen).
其他属性则是XUL 专有的,比如 grippyhidden (不让用户隐藏某个菜单栏)和oncommand (这是一个事件处理程序,当选中某个菜单项时激活)。
Others are special to XUL, like grippyhidden (which stops a menu bar from being hidden by the user) and oncommand (which is an event handler that fires when a menu option is chosen).
其他属性则是XUL 专有的,比如 grippyhidden (不让用户隐藏某个菜单栏)和oncommand (这是一个事件处理程序,当选中某个菜单项时激活)。
应用推荐