Home >Web Front-end >JS Tutorial >Is there a length limit for js parameters? Found that it cannot exceed 2083 characters_Basic knowledge

Is there a length limit for js parameters? Found that it cannot exceed 2083 characters_Basic knowledge

WBOY
WBOYOriginal
2016-05-16 16:51:531855browse

An ordinary javascript function has only one entry parameter

Copy code The code is as follows:

function test (info)
{
alert(info);
}

The page is generated with aspx code and calls test The entry parameter of the function may be a very long string, and many tags as shown below are constructed on the page based on a data set. Copy the code
. > The code is as follows: test
After the page is generated, some links can be clicked, but some cannot. I used substring to roughly process the value of the entry parameter and found that it cannot exceed 2083 characters. Is there a length limit for js function parameters? I haven't found any relevant statement. I suddenly realized that it was that was to blame. uses get to pass parameters, and the URL has a length limit of 2k anyway. In this case, the number of js functions cannot be exceeded.