开发者

How can I removed styling the javascript prompt?

I have applied the following code in javascript to pop-up a input box for the user:

Javascript code:

var removeDate=prompt("Please enter remove date",curr_date);

But somehow this is come out with 2 thing that I would like to removed it from the prompt, which is the "Explorer User Prompt" and "Script Prompt:"

How can I removed styling the javascript prompt?

Does Anyone know how can I do it? so that I can removed both "Exp开发者_运维百科lorer User Prompt" and "Script Prompt:" and resize the pop-up box?


Unfortunately, I don't believe that you can remove either the title or the "Script Prompt" in the dialog box.

These browser limitations are probably there for security reasons, so that you can't make a JavaScript prompt look like something else in an attempt to trick the user. For that same reason, I don't think you can re-size the prompt window.

If you want to style a prompt, I'd look for a JavaScript UI widget that did this via DOM manipulation rather than an actual call to prompt(). This is one example.


You cannot style the browser's prompt windows. However, you can use a custom prompt window (such as the jQuery Impromptu plugin) instead.


I would suggest not using the prompt to being with. Perhaps the jQuery UI dialog box might be more suiting?

dialog box


You can't style that.

Use a custom one.

Keep in mind a custom one won't work quite like the default one, i.e. locking the browser whilst waiting for user input. It will need to use a callback.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜