LLWiki正在建設中,歡迎加入我們!
「Widget:Sandbox」修訂間的差異
跳至導覽
跳至搜尋
小 |
小 |
||
第4行: | 第4行: | ||
//</includeonly>JavaScript脚本:<pre lang="js"> |
//</includeonly>JavaScript脚本:<pre lang="js"> |
||
// 这里输入代码 |
// 这里输入代码 |
||
window.addEventListener('load', function () { |
|||
document.querySelectorAll( '.username' ).forEach(function(ele) { |
|||
ele.contentText = mw.config.get('wgUserName'); |
|||
}); |
|||
}); |
|||
//</pre> |
//</pre> |
||
<includeonly> |
<includeonly> |
於 2020年10月5日 (一) 22:18 的修訂
這裏是Widget沙盒,管理員用戶可以使用以下預先準備的框架進行編輯測試。 |
JavaScript腳本:
// 这里输入代码
window.addEventListener('load', function () {
document.querySelectorAll( '.username' ).forEach(function(ele) {
ele.contentText = mw.config.get('wgUserName');
});
});
//
CSS樣式表:
*/
/* 这里输入代码 */
/*
效果: