开发者

To pass values in a table as an array to javascript

Is there a way that I could pass 5 values of a field from a table as an array to javascript functi开发者_运维百科on on onchange event of a dropdown box.

The 5 values have to be fetched through sql query.


yes.. But like an array i dont know.. Give the id to each of your field and in onchange method just pass the value of each id using document.getElementById('id name').value

for giving the id use the div tag and put your fetched data between div tag.. So you can get the data using onchange function using above technique

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜