在sharepoint 2010的页面中,我们在页面的最上方,有一条深灰色的Ribbon工具栏,如下图,这里可以通过下面的脚本,做一些脚本,来控制它的隐藏和显示。

最后把这些脚本,放在v4.master母板页的<div id="s4-workspace"></div>这个标签里面。

<div style="background-color: gray;text-align: right">

<input type="button"  id="hideRibbon"  value="显示" onclick="HideRibbonFunc()"/>

<wssuc:welcome id="IdWelcome"  runat="server"  enableviewstate="false">

</wssuc:welcome>

<wssuc:muiselector id="IdMuiSelector" runat="server" />

<style>

.ms-welcomeMenu a:link

{

/* [ReplaceColor(themeColor:"Light1",themeTint:"0.9")] */

color: white;

}

.ms-welcomeMenu.ms-SpLinkButtonActivea:link

{

/* [ReplaceColor(themeColor:"Light1",themeTint:"0.9")] */

color: white;

}

</style>

</div>

<script>

function HideRibbonFunc() {

var ribbonrowObj = document.getElementById("s4-ribbonrow");

if (ribbonrowObj.style.display =="none") {

document.getElementById("hideRibbon").value ="隐藏";

ribbonrowObj.style.display = "";

}

else {

document.getElementById("hideRibbon").value ="显示";

ribbonrowObj.style.display = "none";

}

}

</script>

sharepoint 2010 显示和隐藏Ribbon区域条的更多相关文章

  1. Android 显示或隐藏标题栏进度条TitleProgressBar

    1.新建项目,布局文件如下:activity_main.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/ ...

  2. Dynamics CRM2011中通过JS脚本方式显示和隐藏ribbon中的自定义按钮

    首先该方法不能写在页面的onload中,因为当从子网格返回常规表单的时候ribbon区域会重新加载而常规表单所在的iframe区域是不会被刷新的,所以如果写在onload中的话就控制的不那么完全了,我 ...

  3. Sharepoint 2010 根据用户权限隐藏Ribbon菜单(利用css)

    本文介绍的是根据用户权限隐藏整个Ribbon菜单项. 操作环境:Windows Server 2008 r2+ SharePoint 2010 1.关于SharePoint  权限详细请参考:http ...

  4. SharePoint 2010 WebPart Web部分 总的膏

    SharePoint 2010 WebPart Web部分 总的膏         之前写SharePoint WebPart Web部分相关的博客,我们没有做一个索引.网友在查看的时候非常不方便,于 ...

  5. 根据权限显示隐藏SharePoint 2010快速启动栏的链接

    转:http://www.360sps.com/Item/ShowAndHiddenLink.aspx 在SharePoint 2010的快速启动栏中可以根据权限来显示或隐藏列表.库.网站的链接,如果 ...

  6. [转]SharePoint 2010 Download as Zip File Custom Ribbon Action

    在SharePoint 2010文档库中,结合单选框,在Ribbon中提供了批量处理文档的功能,比如,批量删除.批量签出.批量签入等,但是,很遗憾,没有提供批量下载,默认的只能一个个下载,当选择多个文 ...

  7. sharepoint 2010 怎样在Ribbon区加入功能button

    继续前面的一篇博客,sharepoint 2010 怎样在列表中加入功能菜单操作项.这次主要是记录下,在Ribbon区域加入功能button.比如加入收藏button.例如以下图所看到的: 1. 还是 ...

  8. [原] SharePoint 2010 WebPart与Google地图系列 一:创建显示地图的WebPart

    摘要: 作为信息化先驱的产品SharePoint 2010竟然对GIS相关技术支持如此有限,试问现在哪个企业没有大量的项目需要结合Google地图来进行开发,单纯地从Google Javascript ...

  9. 解决Sharepoint 2010 custom display form 不显示附件的问题

    sharepoint 2010用designer添加自定义的 display form默认是不会显示附件的. 需要添加如下代码才会显示附件: <tr> <td width=" ...

随机推荐

  1. could not create the java virtual machine(转)

    打开不了myeclipse,报错“could not create the java virtual machine”,解决问题过程如下: 1.在D:\MyEclipse\eclipse有个eclip ...

  2. LA 3942 Remember the Word(前缀树&树上DP)

    3942 - Remember the Word Neal is very curious about combinatorial problems, and now here comes a pro ...

  3. Java中二进制、十进制、十六进制及ASCII码与String及字节数组与十六进制之间的转换

    public class DigitalTrans { /** * 数字字符串转ASCII码字符串 * * @param String * 字符串 * @return ASCII字符串 */ publ ...

  4. sql:oracle, CURSOR

    CursorsYou use a cursor to fetch rows returned by a query. You retrieve the rows into the cursor usi ...

  5. chrome你这是入侵OSX了么?

    今天突然发现安装chrome的应用后,会在Dock中出现如下图标,点击即可启动chrome相关应用,很是方便.

  6. linux下nginx负载均衡部署

    nginx负载均衡部署 Nginx("engine x") 是一个高性能的 HTTP 和 反向代理 server,也是一个 IMAP/POP3/SMTP 代理server. Ngi ...

  7. Rationnal Rose2003安装并破解

    1.安装Rational Rose2003时,在需选择安装项的时候,只选择Rational Rose EnterPrise Edition即可,不需选择其他项,之后选择“DeskTop Install ...

  8. POI读取公式的值

    excel中的数据: package poi; import java.io.FileInputStream; import java.io.IOException; import java.io.I ...

  9. SilkTest Q&A 10

    92. 如何把单个表达式分两行来写? 答案1: 使用Shift + Enter 答案2: 很容易在online help里面找到答案: 1)      line break in code 2)    ...

  10. OSGi:生命周期层

    前言 生命周期层在OSGi框架中属于模块层上面的一层,它的运作是建立在模块层的功能之上的.生命周期层一个主要的功能就是让你能够从外部管理应用或者建立能够自我管理的应用(或者两者的结合),并且给了应用本 ...