-1

我正在使用 MediaWiki,但我无法使用 tag <script></script>

有一种方法可以按类获取 url (location.href) 吗?

比如我把代码location.href放在js文件中,在我放的页面中:

<div class="someclass"></div>

并出现网址?

4

1 回答 1

1

有很多“变量”可用,这应该打印当前 URL(没有任何脚本):

<div>{{canonicalurl:{{FULLPAGENAME}}}}</div>

http://www.mediawiki.org/wiki/Help:Magic_words

于 2012-09-19T03:52:52.140 回答