为用户视图设置图标


把下面的代码放在你的用户视图的设置(即自定义的Javascript),并相应地改变你的favicon.ico的路径。

Code

// Set the Favicon as the page is loading

$("#favicon").attr("href","/jw/plugin/our.theme.Theme/images/favicon.ico");

 

$(document).ready(function() {

    // Set the Favicon after page load, in case the above doesn't set it properly

    $("head").append('<link rel="shortcut icon" href="/jw/plugin/our.theme.Theme/images/favicon.ico"/>');

    // This might be required as well in some browsers

    $('link[rel="shortcut icon"]').attr('href','/jw/plugin/our.theme.Theme/images/favicon.ico');

}

信用:Solnet解决方案

文档更新时间: 2018-11-07 02:20   作者:龙威