How to disable script tag? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to disable script tag?

https://code.sololearn.com/WWmbkYiA19Ic/?ref=app I've tried to change the syntax of JavaScript,by using the string.replace(x,y) function.It works fine,no problem since it's still small.What I doesn't know is how to disable a script from executing, because if you notice, I'd used p tag instead of script, since it throws an error. EDIT : Fixed.

29th Nov 2017, 3:47 AM
Vikaash
Vikaash - avatar
3 Answers
+ 6
Delete it?
29th Nov 2017, 3:58 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
0
@Pegasus ,maybe i didn't explained enough.What I want is,the code to be inside an script tag,but without executing itself, since i use an eval function,i don't want it to execute by the JavaScript interpreter.As an example,a typescript compiler will compile only the codes inside the script tag with type=text/typescript.
29th Nov 2017, 1:32 PM
Vikaash
Vikaash - avatar
0
Actually I just found it,i just added an type=text/someLang,it just didn't execute by itself.
29th Nov 2017, 2:08 PM
Vikaash
Vikaash - avatar