execute javascript from textarea

前端 未结 3 1162
无人及你
无人及你 2021-01-12 07:40

I\'m not entirely sure if this is possible, but I\'m trying to create a mini faux editor in a browser that runs javascript on the page. Here\'s what I\'ve been trying to do

3条回答
  •  不思量自难忘°
    2021-01-12 08:22

    Not sure if this will work in JavaScript but it works in other languages, try importing your script into the script that has the text area then when you want to do the action in the text area call the method in the imported script that has the code you want to execute

提交回复
热议问题