D
D
duck_nukem2017-10-27 16:04:56
Java
duck_nukem, 2017-10-27 16:04:56

Is there a string length limit in prompt()?

prompt(str, str)
Is there a string length limit in prompt() ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2019-07-31
@DDwrt100

Try this r.replace("\"" ,"\'");
https://javarush.ru/groups/posts/614-----ehkraniro...

K
Konstantin Kitmanov, 2017-10-27
@duck_nukem

Theoretically no, it is not specified in the standards. In practice, browsers may implement some kind of limit (say, a kilobyte or two) for common sense reasons.
However, in any case, entering large amounts of data in this way is inconvenient. And the lines displayed in alert / prompt / confirm are cut off in some browsers so that the modal fits into the screen.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question