I'm writing a template engine, which generates the entire HTML file by Javascript. However, after I generate the script tag of JQuery, the JQuery syntax doesn't work. But I found that if the HTML file is static, everything works. I have a line of code in a Javascript to generate the JQuery script tag:
input = input.replaceAt(headTagPos,headTagPos+5,"<head><script src='http://fyp-ivanhoe0523.c9users.io/rapid/jquery-3.1.1.min.js'></script><script>"+script+"</script><style>"+style+"</style>");
After that, the HTML will be like this after being rendered: screenshoot
Everything about JQuery is not working here even the code looks fine.