开发者

The top line in an alert box - Javascript

开发者 https://www.devze.com 2023-04-05 01:39 出处:网络
I am having trouble googling this, because I am no开发者_运维知识库t sure what it is called:-)

I am having trouble googling this, because I am no开发者_运维知识库t sure what it is called:-)

When you create an alert box and it pops up you get the message that needs to be displayed.

Just above that it gives the URL of the domain you are currently on.

Can I change that to say a name rather than a domain?

If so, what is that line called and how do I overwrite this?? Cheers


You cannot change this as its part of the browser. For example chrome shows this:

The top line in an alert box - Javascript

If you need custom alert boxes, take a look into something like jQuery ui Dialog


The "top line" that you refer to is called the "title bar".

And no, you can't change it: this is a browser security feature (and different browsers display different titles).

There are, however, ways to implement your own modal dialogs from JavaScript using HTML & CSS, the jQuery UI dialog being just one of many ways to do so with minimal effort.


No, this cannot be done using an alert, but you could create a popup and change the title.

0

精彩评论

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