Supprimer SharePoint2013 Top Bar dans l'application SP
-
10-12-2019 - |
Question
Je déploie une application SharePoint2013 (SharePoint hébergé).Comment puis-je supprimer la barre supérieure SharePoint2013 (Nom du site, Newsfeed, Sites OneDrive) par JavaScript / CSS?J'ai besoin d'imprimer la page Tha.
merci, nk
La solution
To hide it during Print, you can use the following CSS:
@media print
{
div#suiteBar {
display: none;
}
}
Autres conseils
Or you can print only needed element by using this JavaScript code:
<script type="text/javascript">
function printPartOfPage(elementId) {
var printContent = document.getElementById(elementId);
var windowUrl = '';
var uniqueName = new Date();
var windowName = 'Print' ;
var printWindow = window.open(windowUrl, windowName, 'left=-20,top=-20,width=0,height=0');
printWindow.document.write('<HTML><Head><Title></Title>');
printWindow.document.write('</Head><Body style="margin-left:50px;margin-top:50px;font-size:10pt;">');
printWindow.document.write(printContent.innerHTML);
printWindow.document.write('</Body></HTML>');
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
}
</script>
Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange