4
Hiya傢伙我無法在博客上動態更改ALT標籤。Blogger更改ALT標記
我嘗試了以下腳本,它在我的舊博客上作爲測試示例工作,但我將其添加到使用最新小部件的博客。
<script>
$("img").each(function() {
$(this).attr('alt', '<data:title/>');
});
</script>
有什麼想法?
Hiya傢伙我無法在博客上動態更改ALT標籤。Blogger更改ALT標記
我嘗試了以下腳本,它在我的舊博客上作爲測試示例工作,但我將其添加到使用最新小部件的博客。
<script>
$("img").each(function() {
$(this).attr('alt', '<data:title/>');
});
</script>
有什麼想法?
應該<data:post.title/>
,而不是
<script>
$("img").each(function() {
$(this).attr('alt', '<data:post.title/>');
});
</script>
<script>
$("img").each(function() {
$(this).attr('alt', '<data:post.title/>');
});
</script>
博客的標題是嵌入在jQuery代碼
data:blog.title
<data:post.title/>
<meta expr:content='data:blog.title' property='og:site_name'/>
頁面上的任何錯誤/警告?我希望你之前有jQuery腳本。 – WooCaSh
你是否在控制檯中發現任何錯誤? –
@WooCaSh我認爲你的意思是圖書館,是的,它在那裏 – WebStumblr