如何在移动应用程序中从维基百科 api 重新设置 Json 样式?
我想重新设计维基百科文章的部分并将这些部分嵌入到移动应用程序中。
我尝试使用 http://en.wikipedia.org/w/api.php?action=parse&format=json&page=New_York
但 json 文件中的文本包含 mediawiki 的格式。
如何在没有 mediawiki 平台的情况下维护其他页面的链接,以便它们显示在移动(或网络)应用程序中? 例如
例如
<a href="/wiki/Wikipedia:IPA_for _English # Key" title="Wikipedia:IPA \
for English">
I'd like to restyle part of wikipedia articles and embed these parts into mobile app.
I tried to usehttp://en.wikipedia.org/w/api.php?action=parse&format=json&page=New_York
but text in json files contains formatting for mediawiki.
How to maintain links to other pages without a mediawiki platform, so that they are displayed within the mobile (or web) app?
e.g.
e.g.
<a href="/wiki/Wikipedia:IPA_for _English # Key" title="Wikipedia:IPA \
for English">
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
呵呵,是的,当我不知道如何使用 javascript 编程时,这是我的第一个问题。
初学者提出问题的方式很有趣:)
如果有什么有用的东西可以分享,我会时不时地回到我的旧问题并回答它们。
回答我自己的问题:
有可能劫持链接。
为了简单起见,这里使用 jquery,可以选择具有模式的
标签,然后将函数绑定到它们。
例子:
hehe, yes, this was one of my first questions when I did not know about programming with javascript.
It is funny how questions are posed when beginner :)
Here and then I will go back to old questions of mine and answer them if something useful to share.
To answer my own question:
it is possible to hijack a link.
using jquery here for simplicity, it is possible to select
<a>
tags that have a pattern and then bind a function to them.Example: