开发者

How to increase or decrease number of rows in table in HTML

i am trying to retrieve information from the database but i dont know how number of the rows will be retrieved. information will be retrieved from the follow开发者_Go百科ing statement.

SELECT * from pgw_alarm WHERE (((pgw_alarm.sev)='0 0 0') AND ((pgw_alarm.month)='"+mon+"'));

now i want to display them to user using table since i dont know how many rows will be there i am unable to create table. is there a way to increase the number of rows in table if so how if not what is the alternative way to display them.

thank you.


In pure HTML this is not possible, however a number of technologies will solve this issue for you. Depending on your server side language, such as JSP or ASP you may be able to dynamically create the rows on the server. Another possibility is to retrieve the rows via Ajax and use javascript to dynamically create dom elements that correspond with each row and append them.


The server-side developer should define a loop in the provided html template. Thus any number of rows can be displayed.

Alternatively the server-side developer should provide a gateway URL which returns JSON formatted data, which can be accessed through AJAX call and then any number of rows generated via JavaScript.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜