/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script> function GetElementByText(tagName, title) { var a = document.getElementsByTagName(tagName); for (var j=0; j < a.length; j++) { //alert(a[j].id); if (a[j].id.indexOf(title)>0) { //alert('Entra'); return a[j]; } } return null; } function hideWinExp() { var n = GetElementByText("ie:menuitem","OfflineButton"); if (n) { //alert('Entra 2'); n.disabled = true; } } _spBodyOnLoadFunctionNames.push("hideWinExp"); </script>