Reputation:
JavaScript:
var docHeadText = document.head.innerHTML;
var patt =/\/*:.+?:*\//g;
patt.compile(patt);
docHeadText.match(patt);
HTML:
<head>
<script type="text/javascript">
function JValues(){
alert('/*:hello-world:*/');
}
</script>
</head>
It returns :hello-world:*/
but I want it to return /*:hello-world:*/
Upvotes: 0
Views: 58