Create similar to fb:tag

丶灬走出姿态 提交于 2019-12-19 11:27:16

问题


I would like to create something similar to fb: tag.

For example if you put fb:comments in your code it would display your comments from Facebook.

Ofcourse you need to include the Facebook xmlns in your HTML head.

How can I create my own tags to perform for example encryption?

For example: <myEncrypt:key>encrypted word</myEncrypt:key>

Is that possible? I think it is. Can someone give me some directions on how to achive that?

Thanks


回答1:


Its actually done by javascript (if you are talking about puting fb:... in html). All that you need to do is parse the DOM tree on load of document for particular tag/prefix and process as needed. You can use jQuery or dojo etc for complex queries. Same concept used in dojo for widgets but with custom attribute on tag.

<button data-dojo-type="dijit.form.Button" type="button">


来源:https://stackoverflow.com/questions/6447377/create-similar-to-fbtag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!