Javascript-the selected items cannot be selected after the drop-down list is selected.

Source: Internet
Author: User
Tags php foreach
1. after the drop-down list is selected, no corresponding parameters are available in the address bar. The data can be queried, but the drop-down list cannot be changed to the selected html: & amp; lt; divclass & quot; span3 & quot; & amp; gt; {code ...} js: functiondissearch () {code ...} post the error message and paste the relevant information...

1. After the drop-down list is selected, no corresponding parameters in the address bar can be found, but the drop-down list cannot be changed to the selected item.

Html:

            

Brand: Select brand >

Js: function dissearch (){

var url = "/console/distribute/distribute/index/";var agt = "?";if($("#disbrand").val()!=""){    url+=agt+"brand_id="+$("#disbrand").val();    agt = "&";}
  1. Post error message

  2. Labeling

  3. Methods that have been tried are still not resolved (attached with the relevant link)

Reply content:

1. After the drop-down list is selected, no corresponding parameters in the address bar can be found, but the drop-down list cannot be changed to the selected item.

Html:

            

Brand: Select brand >

Js: function dissearch (){

var url = "/console/distribute/distribute/index/";var agt = "?";if($("#disbrand").val()!=""){    url+=agt+"brand_id="+$("#disbrand").val();    agt = "&";}
  1. Post error message

  2. Labeling

  3. Methods that have been tried are still not resolved (attached with the relevant link)

I just don't know if your $ args ['brand _ id'] already exists. You should first var_dump it to see if it doesn't work. If it doesn't work, change the SELECTED to selected = "selected"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.