The above one is the visualforce page code now let’s see the code for the apex class, see below.
scriptvar='<script> func(); </script>';
Now visualforce page that is referring scriptvar variable is the outputtext tag at line 16th in visualforce page code and this tag also have one attribute Escape, this attribute going to be decide how should scriptvar variable will going to look or behave in browser specially when if a variable contains the HTML tags like angular brackets, to understand more about this attribute take a look down below description.
What is escape attribute in salesforce
I hope you like my this post and if you have any query then leave a comment below in the comment section i will try help you and don’t forget to subscribe to my blog and social networking pages and also you can look at some below related post.