Hi, I'm just wondering how to pass data from javascript to server.

There is just only one way which came upon.
That's something like hidden div in <form> .. </form>, get the object, and via InnertHTMLconcatenate <input>s ...

document.getElementById("mydiv").InnertHTML = "<input type=\"hidden\" value=\""+data+"\" />";
And so on ...

I don't like it really. And also there is a bug when data contains " it goes wrong

So how this is done professionally?