标签归档:oncontextmenu

javascript学习笔记1:return,onclick,confirm,oncontextmenu,window的event和注释和排错

// javascript的单行注释符
两个斜杠是javascript的单行注释

oncontextmenu
Fires when the user clicks the right mouse button in the client area, opening the context menu,当用户右键单击页面的时候,打开一个右键菜单

return关键字,举例
    <script language=”javascript”>
         function myfunction(a,b){
         var r;
          r = a+b;
         return(r)
         }
window.alert(myfunction(3,2));
</script>

继续阅读