0
sanitized output
I <html> <body bgcolor="gold"> <form> <label for="m_data">malicious data:</label> <input type="text" char rem='@' char i; for(i=0;i<str.length;i++) { var ch=charAt(i) if(rem==ch){ str=str.replace("str", @); document.write(str); }}><br><br> <input type="submit"> </body> <html> i want when i write Reem@ the output will come only Reem the @ removed .. whatâs wrong in my code ???
5 Answers
+ 1
you're welcome âșïž
+ 1
The way you put your Javascript code is not valid. And you can remove @ without using a loop. Take a look at the fixed code below.
https://code.sololearn.com/Wip24708w3R3/?ref=app
+ 1
@Azza do you mean input box? If so then after submitting the information the form should just be empty. Why would you need to show the output to the user form. Also I'm not even sure how to do that.
0
Thanks Abir Hasan đ
but how can display the output inside the textbox ??
0
exactly Abir Hasan
My teacher asked me that
he told me try đ€·đ»ââïž
ok thank you Abirđ