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:
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.
精彩评论