开发者

loading a new form with ajax

开发者 https://www.devze.com 2023-01-05 03:59 出处:网络
i have a combo boxwhat i want is whenever a new optionfrom combo box is selected new form is loaded below开发者_开发技巧 the combo box with out refreshing the page can some one provide the scriptYes d

i have a combo box what i want is whenever a new option from combo box is selected new form is loaded below开发者_开发技巧 the combo box with out refreshing the page can some one provide the script


Yes download the jQuery and you can simpley do with jQuery/Ajax.

<select onChange="$('#formDiv').load(this.options[this.selectedIndex].value)">
  <option value="/pages/form1.html">form1</option>
  <option value="/pages/form2.html">form2</option>
</select>

<div id="formDiv"></div>

This is basic structure I gave, You can enhance it to work it in more secure way.

0

精彩评论

暂无评论...
验证码 换一张
取 消