如何在单击按钮时动态创建和填充组合框? [英] How to create and fill combobox dynamically on clicking button ?
本文介绍了如何在单击按钮时动态创建和填充组合框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在单击按钮时动态创建并填充组合框.
例如,我在数据库中有值,例如:-
id名称
1 A
2 B
3 C
现在,应该将其填充到组合框中.
另外,每次我按下Buttin时,都应该创建新的组合.
所以,请帮帮我....
I Want to create and fill combobox dynamically on clicking on button.
For example I have values in database, like:-
id Name
1 A
2 B
3 C
Now, this should get fill in combobox.
Also, Every time I hit buttin, new combo should create.
SO, please help me....
推荐答案
如果您想在首次单击时显示第一个组合
第二次第二次点击,依此类推......
只需在每次单击按钮时回显组合标记,然后设置您要显示的位置即可...........
if u want display first combo on first click
second on second click and so on.........
Just echo the combo tag on every click of button and set where u want to display..............
hi
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - jsFiddle demo</title>
<script type='text/javascript' src='js/jquery.min.js'></script>
<link rel="stylesheet" type="text/css" href="/css/normalize.css">
<link rel="stylesheet" type="text/css" href="/css/result-light.css">
<style type='text/css'>
</style>
<script type='text/javascript'>//<![CDATA[
(窗口).load(function(){
(window).load(function(){
这篇关于如何在单击按钮时动态创建和填充组合框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文