Home > front end > Why pop up is 1111, I want to display a pop-up is 2222 2222
Why pop up is 1111, I want to display a pop-up is 2222 2222
Time:11-13
<script SRC="https://bbs.csdn.net/topics/js/jquery-3.4.1.min.js" & gt; </script> <script> $(" body "). The delegate (" # type ", "change", function () { If ($(" # type "). The val ()==2) { $(" # show2 "). The show (); $(" # show1 "). Hide (); } else { $(" # show1 "). The show (); $(" # show2 "). Hide (); } }); </script>
The $(document). Ready (function () { $(" button ") on (" click ", function () { Alert ($(" # TXT "). Val ()); }); }); </script>
CodePudding user response:
Alert ($(" # TXT "). Val ());
As for two input the id of the first output is 11111 for sure
CodePudding user response:
I know that same id, is the one wants to hide, and then get the display
CodePudding user response:
Don't repeat a page id
CodePudding user response:
Var id='# TXT' + $(" # type "). Val () Alert ($(id). Val ());
CodePudding user response:
Click on add a 1 to 1 when id=TXT click 2 put both id assignment is empty, and then add an id to 2,