Click here to Skip to main content
15,894,740 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do I make a table or Gridview type table in jQuery JavaScript?
C#
 var jsonRes = jQuery.parseJSON(result.d);
 for (var i = 0; i < jsonRes.length; i++) {
      //create table: loop = loop + jsonRes[i].id + "  " + jsonRes[i].datetime1 + "  " + jsonRes[i].col1 + "  " + jsonRes[i].col2 + "  " + jsonRes[i].col3 + carriagereturn;
}

Also what is the code for a carriage return in javascript?

In other languages: br/> or vbcrlf.

What is it in javascript?
Posted
Updated 19-Dec-14 5:48am
v3
Comments
jaket-cp 19-Dec-14 12:23pm    
Not sure what you mean on the table jQuery front.
But the carriage return in javascript is \r
New line \n
Have a look at http://www.w3schools.com/js/js_strings.asp

1 solution

Refer the fiddle http://jsfiddle.net/mjaric/sEwM6/[^].

You can draw a table from Json result very easily.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900