问题
I want to scale all the HTML element's height in an HTML page. I am doing this with jQuery height() function, but it takes some time and causes problems in the browser. I decided I want to do this at the server. I tried to do this with ajax. But I couldn't. When I write height()
function it doesn't return to me value of height()
. It returns me just height()
code.
For example:
I will send my html code to server with this function
sendHtml('<table><tr><td>'.$variable.'</td></td></table>');
Then i get this table's height from server.
Is there another way to do this?
回答1:
You might want to look into Node.js It's server-side javascript.
来源:https://stackoverflow.com/questions/9113959/server-side-getting-dom-properties-height-of-element