+ 4
Functions in output
Lets say i define a function in the code in javscript and the body has an attribute:contenteditable and i write a function in the body that was defined in the javascript code, how can i make the function written in the body do the same as the one in tje javascript code; if my question wasnt clear, please tell me
9 Réponses
+ 21
Gekoda, good question!
First of all — to execute a function print you need to call it somewhere in your code. Otherwise it won't work 😥.
https://code.sololearn.com/W9rVJk28tqBe/?ref=app
+ 20
Check out my example. It runs twice 👍.
https://code.sololearn.com/W9rVJk28tqBe/?ref=app
+ 4
Can you share the code? Because it isn't really clear to as what you want to do ,if you write a function in body it should work the same as well !
+ 3
+ 3
But how can i make it run as if the text in the body is the JavaScript code😥
+ 3
Here : hope this helps
https://code.sololearn.com/Ww8dD3l31YiQ/?ref=app
+ 2
Gekoda I didn't get your question, but let me still ask you, did you want to manipulate the text inside the body with JavaScript. Pls just share an example of what you want to achieve.
0
Gekoda. [[[[[[I N A C T I V E]]]]]] check this code maybe is what you want.
How it works click the button to output the value inside the function with the parameter inside print() function you created, keep clicking on the button to add print the same value as many as possible you can equally edit the output. But if it's not what you need pls be more specific.
https://code.sololearn.com/W8Ms3bCNqmXy/?ref=app