Is there a way to embed [removed] content into a Doxygen \mainpage section?

后端 未结 1 1824
北恋
北恋 2021-01-03 04:58

I would like to introduce some javascript content into my generated index.html in order to add reddit and facebook \"like\" but

相关标签:
1条回答
  • 2021-01-03 05:42

    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
    
    */
    
    0 讨论(0)
提交回复
热议问题