How to hide manu on sharepoit

Here is a example

<script language="JavaScript">
 var doc = document.getElementsByTagName('ie:menuitem');
 for (var i = 0; i < doc.length; i++)
 {
  item = doc[i];
  if (item.id.match('ExportToSpreadsheet') != null
                || item.id.match('ExportToDatabase') != null
                || item.id.match('EditInGridButton') != null)
  {
   item.hidden=true;
  }
 }
</script>

原文地址:https://www.cnblogs.com/sharepointhome/p/2087860.html