如何增加可以分配给隐藏字段的字符串的最大长度 [英] How to increase max length of string that can be assigned to hidden field

查看:67
本文介绍了如何增加可以分配给隐藏字段的字符串的最大长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我在jquery中有一个字符串,由tr和td组成。

由于数据量大字符串长度变得太大。

我必须将它分配给隐藏字段,以便我可以使用该隐藏字段将创建的表导出为ex​​cel。

但是由于弦长很大,隐藏的场地不能拍弦。

请建议。



我是什么尝试过:



for(i = 0; i< list.length; i ++)>

{

var tr + =

+ list [i] +


}



$('#hdnfld')。val(tr);

解决方案

< blockquote>('#hdnfld')。val(tr);


字段大小没有限制。嗯,从技术上讲,它可以容纳21.47亿个字符,但这不是你所说的。



如果你指的是一个提交回的字段服务器,然后限制是最大请求大小。对于HTTP GET,通常大约2048个字符,具体取决于浏览器。对于PUT,它仅受服务器设置的限制。有关请求正文大小或类似内容,请参阅Web服务器的文档。


Hi,

I am having a string in jquery which is comprised of tr and td.
Due to large amount of data the string length has become too large.
I have to assign it to hidden field so that I can then use that hidden field to export the created table to excel.
But due to large length of string, the hidden field is not able to take the string.
Please suggest.

What I have tried:

for(i=0; i<list.length;i++)>
{
var tr+="

"+list[i]+"
"
}

$('#hdnfld').val(tr);

解决方案

('#hdnfld').val(tr);


There is no limit to the size of the field. Well, technically, it can hold 2.147 billion characters but that's not what you're talking about.

If you're referring to a field that is submitted back to the server, then the limit is the maximum request size. For a HTTP GET that's usually about 2048 characters depending on the browser. For a PUT, it's only limited by the server settings. Consult the documentation for your web server for a Request Body Size or something similar.


这篇关于如何增加可以分配给隐藏字段的字符串的最大长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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