SoFunction
Updated on 2025-04-10

The solution to running code needs to be refreshed by js implementation

Now most websites have the function of "running code", and Search Bar has implemented this function very early, but recently when working on a project, I found that some of them need to be refreshed to see the results. I explored it myself. In fact, the solution is very simple. Look at the following code:

function runCode(cod1) { 
    cod=(cod1) 
    var code=; 
    var newwin=('','',''); 
     = null; 
    (code); 
    (); 
    (); 
}
Just add this sentence:

();