You can use @mainpage in conjunction with the @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
*/
source
share