服务器端获取dom属性(元素的高度) [英] Server-side getting dom properties (height of element)

查看:202
本文介绍了服务器端获取dom属性(元素的高度)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在HTML页面中缩放所有HTML元素的高度。我正在使用jQuery height()函数,但它需要一些时间并在浏览器中导致问题。我决定在服务器上这样做。我试图用ajax这样做。但我不能。当我写 height()函数时,它不会返回到$ code> height()的值。它返回我只是 height()代码。



例如:



我将使用此功能将我的html代码发送到服务器

  sendHtml('< table>< tr>< td>'$ variable。'< / td>< / td> ; /表>'); 

然后我从服务器获取此表的高度。


解决方案

您可能需要查看 Node.js 是服务器端的JavaScript。


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?

解决方案

You might want to look into Node.js It's server-side javascript.

这篇关于服务器端获取dom属性(元素的高度)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆