0

根据附件,如何在 SharePoint 中创建细化面包屑?

请帮我。谢谢...

在此处输入图像描述

4

1 回答 1

0

我们可以使用jQuery来实现它,下面的代码供大家参考:

<script src="//code.jquery.com/jquery-1.12.4.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () { 
    buildBreadcrumb();
    $("select[title='Department']").change(function(){
        buildBreadcrumb();
    });
    $("select[title='Branch']").change(function(){
        buildBreadcrumb();
    });
    $("select[title='Sub Branch']").change(function(){
        buildBreadcrumb();
    });
});
function buildBreadcrumb(){
    var department = $("select[title='Department']").val();
    var branch = $("select[title='Branch']").val();
    var subBranch = $("select[title='Sub Branch']").val();
    $("#refBreadcrumb").html(department+">>"+branch+">>"+subBranch);
}
</script>
<div id="refBreadcrumb"></div>
于 2018-03-06T10:00:19.420 回答