문제

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