Output
Touch Me for 2 seconds!
Sample Code
<script>
function call(num)
{
alert(num);
}
</script>
<div contextmenu="cm">
Touch Me for 2 seconds!
</div>
<menu id="cm" label="Context
Menu" type="context">
<command label="cmd1"
onclick="javascript:call(0)" />
<menu label="sub menu1">
<command label="cmd1"
onclick="javascript:call(1);"/>
</menu>
</menu>
<br>
<menu type="toolbar">
<menu label="menu1"
type="list">
<menu label="sub menu"><command label="cmd1"
onclick="javascript:call(2);"/>
<command label="cmd2"
onclick="javascript:call(3);"/>
</menu>
</menu>
<menu label="menu2">
<command label="cmd1"
onclick="javascript:call(4);" />
</menu>
</menu>