How to make html file from textarea content
I want to create a html file from the contents fetched from the textarea.
I want to know, how to save the html file and how will I get this html file in my location from the content shown below
'<te开发者_JAVA百科xtarea id="Textarea"><html><head></head><body>Hai</body></html></textarea>`
When you submit the text area content, the server side code should create file with these contents and save it at a location which is accessible to the browser via some URL.
If you want to write to a file using JavaScript you can't. You can pass document.getElementById('Textarea').innerHTML
to a webservice that will save it's output to a file...
The following did the magic for me:
$message = str_replace('<','<',$message); $message = str_replace('>','>',$message);
精彩评论