Issue with Ajax, Jquery and PHP and Two Dropdown list

后端 未结 2 1173
粉色の甜心
粉色の甜心 2021-01-26 07:26

I am trying to populate second dropdown list based on first dropdown list selection using Ajax, jQuery,PHP and MySQL. the problem is the options in second dropdown list just app

2条回答
  •  遥遥无期
    2021-01-26 08:14

    You are setting $('#result').html(data); in the main file.

    result should be the id of the HTML select element, you used it as id for the an option element.

    (You are appending the values into the option element, which doesn't create new HTML elements, but they should be inserted into the select element.)

提交回复
热议问题