Click here to Skip to main content
15,898,588 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I try to write conditional comment statement inside script tag but it didn't work.
If i put conditional comment statement outside of script block it's working.
XML
<!--[if IE]>
<script type="text/javascript">
function ScrollToTopInIE()
{
    window.scroll(0,0);
}
</script>
<![endif]-->

any one have idea how to put conditional comment inside script tag of aspx page?
Posted

If you're talking about an HTML comment, you can't nest comments in HTML.

If you're talking about a javascript comment, it should work just fine if you're building the entire html element. You probably already know this, but a javascript comment starts with "//".
 
Share this answer
 
v2
Avrebbero ingannare online casino la fiducia di quelli amati mettendo a punto ridicole menzogne ​​da cui moneta è andato perso.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900