Load html+script in to an element

Is it possible to load html+script in to an element instead of opening new windows?
I managed to load successfully using node fs but new script couldn’t be executed.
I’d like to create application that look like SPA but I don’t want to use framework like react or vue.

Thanks in advance