would it be possible to type in pure HTML into a textarea and then add that html to a different html document?
I am thinking this could work? or maybe jquery with ajax might work?
<form action="HTML.html" method="post">
<textarea rows="7" cols="30"></textarea>
<button type="submit">send</button>
</form>
but I’m not sure, also I know I can do it with PHP but I wanna try and see if it would be possible through just javascript.
Permanently? No, it cannot be done just with Javascript. You can’t edit a file on the server without write access to the server, and since Javascript runs in the user’s web browser, it does not have write access to your server.
Temporarily? Maybe. If all you want is for the form’s results to show up on the page that comes after the user hits submit, that’s more feasible. First, though, Javascript can’t read POST data, so that’s out. Instead, you’d need to use GET, and use Javascript to read the query string stored at
document.location.search, then write the user’s HTML to theinnerHTMLof an HTML element.