MediaWiki:Common.js:修订间差异
来自Limbo Wiki Mirror
修复bug? |
小 现在单个页面可以有多个按钮了! |
||
| 第2行: | 第2行: | ||
$("#lw-title").ready(function(){$("title").html($("#lw-title").get(0).innerHTML);}); | $("#lw-title").ready(function(){$("title").html($("#lw-title").get(0).innerHTML);}); | ||
$("#lw-firsthead").ready(function(){$("h1#firstHeading").html($("#lw-firsthead").get(0).innerHTML);}); | $("#lw-firsthead").ready(function(){$("h1#firstHeading").html($("#lw-firsthead").get(0).innerHTML);}); | ||
$( | $(document).ready(function(){ | ||
a = $(".lw-treebut"); | |||
b = a.size(); | |||
var i; | |||
for (i = 0; i < b; i++){ | |||
a.get(i).innerHTML = "<button type=\"button\">" + a.get(i).innerHTML +"</button>" | |||
} | |||
}); | }); | ||
2021年11月28日 (日) 18:39的版本
/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */
$("#lw-title").ready(function(){$("title").html($("#lw-title").get(0).innerHTML);});
$("#lw-firsthead").ready(function(){$("h1#firstHeading").html($("#lw-firsthead").get(0).innerHTML);});
$(document).ready(function(){
a = $(".lw-treebut");
b = a.size();
var i;
for (i = 0; i < b; i++){
a.get(i).innerHTML = "<button type=\"button\">" + a.get(i).innerHTML +"</button>"
}
});
