0
Help regarding html forms
I want the form action to be done only when given input is what i want.. for ex (see the below code) i want the form action to be done only if i give some specific characters and click submit..in this code if i give any character and click submit, the form action is executed but i don't want that..how can i set some prefixed password using html? https://code.sololearn.com/WrauOVPc3OxH/?ref=app
9 ответов
+ 3
https://code.sololearn.com/WkRPLzRI3FIX/?ref=app
I edited your code and added some JavaScript. If you type any text othet than "Words", it will not direct you to other page.
Meaning the text " Words" work only.
+ 3
Words
+ 3
I am just a beginner. Any suggestion sir? That might also help me.
+ 3
This one is better. I pasted the code from you Toni Isotalo. All credits to both of you. Thanks for the new knowledge.
https://code.sololearn.com/WEXA9cWx3G0y/?ref=app
+ 2
Alquen Sarmiento
It just unsets the action attribute to false which is same as empty. So it will still submit but the action is the current page.
+ 2
With the knowledge I know, I think JS is needed
0
Alquen Sarmiento , what's the password for your form?
0
thanks..but can't i do it with html?
0
can i use html for the same Alquen Sarmiento ?