本文介绍了有没有办法嵌入< script>内容到Doxygen \ mainpage部分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我生成的index.html中引入一些javascript < script> xxx< / script> 内容,以便添加reddit和facebooklike按钮到我项目的主页面。有没有办法使用Doxygen自动完成?

I would like to introduce some javascript <script>xxx</script> content into my generated index.html in order to add reddit and facebook "like" buttons to my project's main page. Is there a way to accomplish this automatically using Doxygen?

谢谢,

SetJmp

推荐答案

您可以将@mainpage与@htmlonly ... @ endhtmlonly块结合使用。下面是一个示例:

You can use @mainpage in combination with an @htmlonly...@endhtmlonly block. Here is an example:

/** @mainpage My Script Page

Here is an embedded script:
@htmlonly
 <script type="text/javascript">
 function displayDate()
 {
 document.getElementById("demo").innerHTML=Date();
 }
 </script>
 <div id="demo">date</div>
 <script type="text/javascript">displayDate();</script>
 <br/>
 <button type="button" onclick="displayDate()">Refresh Date</button>
@endhtmlonly

*/

这篇关于有没有办法嵌入&lt; script&gt;内容到Doxygen \ mainpage部分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 20:26