开发者

To pass values in a table as an array to javascript

开发者 https://www.devze.com 2023-03-23 06:50 出处:网络
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.

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

精彩评论

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