Home > front end >  [for] [a jquery] click launches the drop-down box and choose more, and then selected the value of th
[for] [a jquery] click launches the drop-down box and choose more, and then selected the value of th

Time:10-08


requirements: click on the drop-down box and choose more, and then select the value of the post to the processing page
//basic structure as follows 
//there needs to be in a similar input, after click, multiple-choice, name="content_array
"

//testarray. PHP page can 
$content_array=$_POST [] "content_array";

CodePudding user response:


I now use the EasyUI, practice, found just post multiple values,
 & lt; ! DOCTYPE html> 


Test 01 & lt;/title> <br/><meta charset="UTF-8"> <br/><br/><link rel="stylesheet" type="text/CSS" href="https://bbs.csdn.net/topics/EasyUI/easyui.css"/& gt; <br/><The script type="text/javascript" SRC="https://bbs.csdn.net/topics/EasyUI/jquery.min.js" & gt; </script> <br/><The script type="text/javascript" SRC="https://bbs.csdn.net/topics/EasyUI/jquery.easyui.min.js" & gt; </script> <br/><br/><style type="text/css"> <br/></style> <br/><br/><The script type="text/javascript" & gt; <br/>$(function () {<br/>$(' # ddlLine). Combotree ({<br/>ValueField: "id",//the Value field <br/>TextField: "text",//text field <br/>Multiple: true, <br/>Data: [{" id ": 1," text ":" All ", "children" : [{" id ": 13," text ", "C1"}, {" id ": 14," text ", "C2"}, {" id ": 15," text ":" C3 "}]}] <br/>, <br/>//url: "tree_data2. Json,//data source <br/>The onCheck: function (node, checked) {<br/>//let the future generations don't show <br/>$(" # ddlLine "). Combotree (" setText ", $(" # ddlLine "). The combobox (" getText "). The toString (). The replace (" future generations, ", "")); <br/>}, <br/>OnClick: function (node, checked) {<br/>//let the future generations don't show <br/>$(" # ddlLine "). Combotree (" setText ", $(" # ddlLine "). The combobox (" getText "). The toString (). The replace (" future generations, ", "")); <br/>} <br/>}); <br/>}) <br/></script> <br/></head> <br/><body> <br/><br/><The form method="post" action="testarray. PHP & gt;" <br/>Pops: & lt; Select id="ddlLine" name="content_array" style="width: 205 px; Height: 24 px;"> <br/></select> <br/><Input type="submit" value="https://bbs.csdn.net/topics/transfer option value & gt;" <br/></form> <br/><br/></body> <br/></html> </pre> </div> <div class="th_page th_page_color"></div> <div class="umCopyright"> <p>Page link:<a href="/frontend/56766.html" target="_blank" style="color:#999">https//www.codepudding.com/frontend/56766.html</a></p> </div> <div class="detail-arr"> <div class="detail-arr-left">Prev:<a href='/frontend/56765.html'>How do you write with javascript artificial intelligence? Do you have a great god can some direction</a></div> <div class="detail-arr-right">Next:<a href='/frontend/57260.html'>For help, would like to have two different login interface, how to jump to the same interface implem</a></div> </div> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="hot-tags neitags"> <ul> <li><i class="iconfont icon-x-tags"></i> Tags:  </li> <a href='/e/tags/?tagname=JavaScript' target='_blank'>JavaScript</a> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="xiangguan"> <ul class="msg msghead"> <li class="tbname">Related</li> </ul> <ul> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="flinks"> <ul> <li><i class="iconfont icon-x-tags"></i> Links:  </li> <li class="liflinks"><a target="_blank" href="/" title="CodePudding">CodePudding</a></li> </ul> </div> </div> </div> </div> <div class="footer"> <p><span style="font-size:16px;color:#666;font-weight: bold">About Us:</span>  <a href="https://www.codepudding.com/contact.html">Contact Us</a>      <a href="https://www.codepudding.com/service.html">Terms of Service</a>      <a href="https://www.codepudding.com/privacy.html"> Privacy Policy</a></p> <p class="foot_info">Copyright © 2010-2023,Powered By <a href="/" target="_blank">CodePudding</a> </p> </div> <script type="text/javascript" src="/skin/code/tianhu.js"></script> </body></html>