Вопрос

I was wondering that could it somehow be possible to add onkeydown event to prompt()?

Это было полезно?

Решение 2

No you can't becouse is a browser native dialog function and it is not available by the DOM.

You can achieve a similar effect with some external javascript library like jQuery.Dialog or bootstrap modal or simplemodal and then attach to that event

Другие советы

Unfortunately No.

The prompt() dialog is a native dialog (not DOM driven) and not open to manipulation via JavaScript.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top