Hello,
I am new to JS and am trying to add some HTML into a JS function. So
that when called the script as well as the HTML will be invoked. Is
there some type of embed mechanism, sort of the reverse of embedding JS
in an html page with the script tag. (which is what I am doing in this
case)
Is this even possible?
....(does not work)
<script>
function alertuser() {
alert("FOO FOO");
<html><input type="file" name="file.1" tabindex="1"> </html>
}
</script>
....
Any help will be greatly appreciated!
Thanks!
I am new to JS and am trying to add some HTML into a JS function. So
that when called the script as well as the HTML will be invoked. Is
there some type of embed mechanism, sort of the reverse of embedding JS
in an html page with the script tag. (which is what I am doing in this
case)
Is this even possible?
....(does not work)
<script>
function alertuser() {
alert("FOO FOO");
<html><input type="file" name="file.1" tabindex="1"> </html>
}
</script>
....
Any help will be greatly appreciated!
Thanks!
Comment