How to make a simple modal pop up form using jquery and html

0 votes

I've read the jQuery tutorials, but I'm still having trouble understanding them. Is there anyone who could explain it to me in a clearer way, please? What I want to happen is that when I press one of my buttons, its value will appear in #valueformyButton, and when the modal pops up, I can type a text, and after I click OK, the text that I type will be added to #valueformycode.

<!DOCTYPE HTML>
    <html lang="en">
    <head>
        <meta charset="utf-8">
    </head>
    <body>
        <input id="btn1" type="button" value="1">
        <input id="btn2" type="button" value="2">
        <input id="btn3"type="button" value="3">

        <input id="valueForMyModal" type="text">

        <!--How to make this pop up modal form-->
        <div id="myform">
            <form>
<label id="valueForMyButton"></label>
            <input id="name" type="text">
            <input id="btnOK" type="button" value="Ok">
            </form>
        </div>
</body>
</html>
Jul 24, 2022 in HTML by Ashwini
• 5,430 points
372 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In HTML

0 votes
0 answers

How to make a back-to-top button using CSS and HTML only?

I'm attempting to create a back-to-top button ...READ MORE

Aug 1, 2022 in HTML by Ashwini
• 5,430 points
268 views
+1 vote
1 answer

How can i create simple register form using html and css?

Html5 contains lots of elements using which ...READ MORE

answered Jan 31, 2020 in HTML by Niroj
• 82,880 points
4,303 views
0 votes
0 answers

How to replace innerHTML of a div using jQuery?

How could I replace the below code ...READ MORE

Jul 4, 2022 in HTML by Tejashwini
• 3,820 points
564 views
0 votes
0 answers

How to disabling and enabling a html input button?

let's say I have a button like  <input id="button" ...READ MORE

Jul 5, 2022 in HTML by Tejashwini
• 3,820 points
248 views
0 votes
0 answers

How to write a simple Html.DropDownListFor()?

I want to create a very straightforward ...READ MORE

Jul 8, 2022 in HTML by Tejashwini
• 3,820 points
284 views
0 votes
0 answers

How to use HTML to print header and footer on every printed page of a document?

Can HTML pages be printed with unique ...READ MORE

Jul 12, 2022 in HTML by Ashwini
• 5,430 points
3,206 views
0 votes
1 answer

What is jQuery?

Hey, jQuery is a fast and concise JavaScript ...READ MORE

answered Feb 14, 2020 in JQuery by kartik
• 37,510 points
1,005 views
0 votes
1 answer

Error: Global Variable is not accessable to local function

Hey kartik, A variable declared outside a function has a ...READ MORE

answered Feb 19, 2020 in PHP by Niroj
• 82,880 points
855 views
0 votes
1 answer

Uncaught TypeError: Cannot read property 'msie' of undefined - jQuery tools

Hello, Use the following script tag in your ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,880 points
14,329 views
0 votes
1 answer

Uncaught Error: Bootstrap's JavaScript requires jQuery

Hello @kartik, You have provided wrong order for ...READ MORE

answered Apr 28, 2020 in JQuery by Niroj
• 82,880 points
22,480 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP