0
Copying after running
This happens on all submits. When I press run, and then I press submit, it displays just a copy of the code.
8 Réponses
+ 9
what language? what code?
The program output area is down the bottom of the screen when using a phone.
+ 7
calvin is awesome.. just thought i would say it..
+ 4
Did you add any event for form submit?
+ 4
What did you provide as url in the 'action' attribute of your <form> element submitted?
+ 3
then you should use addEventListener to listen to submit event. Set the event preventDefault() to prevent default submission.
+ 3
You need js code to do it...
follow this code:
<form id="form">
<input type="submit" />
</form>
<script>
var form=document.getElementById("form");
form.addEventListener("submit",function(e){
e.preventDefault();
alert("form submit detected by js") ;
}, false);
</script>
+ 1
like this? <input type="submit" value="Convert" addEventListener = "preventDefault()"/>
0
HTML; (How do you get to submit? I mean like when you type something it just comes out of the other <input>)