I have my code:

<script language="javascript" type="text/javascript">
alert('This is what an alert message looks like.');
</script>

function showAlert() {
    var country = "Fiji";
    var city = "Suva";
    alert('The city of ' + city + ' is located in ' + country + '.');
}

<input type="button" value="Click Here" onClick="showAlert();">

Result is: The city suva is located in Fiji.

K fine My doubt is: AlerBox contains "The page at localhost:1234 says".Here I want defined user defined statement.How is it possible in javascript.Help me please.

Thanks inadvance.

share|improve this question
1  
This has been discussed already. Please try searching before posting questions. stackoverflow.com/questions/1905289/… – GCaiazzo Dec 14 '11 at 5:21
It not is possible, but you can use a custom alert, using HTML. – David Rodrigues Dec 14 '11 at 5:21
I believe that is the title of the message box and can not be changed. – Arman Dec 14 '11 at 5:21

2 Answers

That message can not be modified at all. Your only option is to create your own html/javascript alert window but it won't be truly modal. You can at best give the illusion of a modal window.

share|improve this answer

Use a custom-made alert. http://www.codeproject.com/KB/scripting/DOMAlert.aspx

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.