+ 1

How I can handle after submit a form and target on a div class or Id

When I click on submit button (input) then we target on a blank white page please help me to get a target div class or Id ??

25th Feb 2021, 11:05 PM
Uddeshya Maurya
Uddeshya Maurya - avatar
4 ответов
+ 2
If i understood you right , you can prevent the default action that submits the form using something like this, document.querySelector("form>input").onsubmit=(e) =>{ e. preventDefault() ; //now you can get the target div class or id here. }
25th Feb 2021, 11:11 PM
Abhay
Abhay - avatar
+ 2
Raj Singh i showed you one . Do some search based on what i said , otherwise i will write a code tomorrow and send it to you.
25th Feb 2021, 11:41 PM
Abhay
Abhay - avatar
0
Do you have an example? please write a code .
25th Feb 2021, 11:31 PM
Uddeshya Maurya
Uddeshya Maurya - avatar
0
I am waiting for your code also because I am going to sleep now .. thank you bro .
25th Feb 2021, 11:46 PM
Uddeshya Maurya
Uddeshya Maurya - avatar