If we have code with javascript and also html what type of snippet to be used .

0
Hi everyone,If we have code with javascript and also html what type of snippet is to be used .  if we are using the html snippet where  the code need to be placed.whether in the "contents" .
asked
1 answers
1

Choose HTML and use the script tag to add JavaScript code into the HTML. 

<script type="text/javascript">
var i = 10;
if (i < 5) {
  // some code
}
//]]>
</script>

 

 

answered