>>function myalert( AlertTxt, AlertTitle ) >>{ >>var DspHtml="about:<head><title>"+AlertTitle+"</title></head>" >>DspHtml=DspHtml+"<body><center>"+AlertText+"<br><button onclick='window.close()'>OK</button></center></body>" >>showModalDialog( DspHtml, "", "dialogWidth:200px;dialogHeight:50px;status:0;help:0;resizable:no;scroll:no" ) >>} >>>>
<html> <head> <script> function myalert( AlertTxt, AlertTitle ) { var DspHtml="about:<head><title>"+AlertTitle+"</title></head>" DspHtml=DspHtml+"<body><center>"+AlertTxt+"<br><button onclick='window.close()'>OK</button></center></body>" showModalDialog( DspHtml, "", "dialogWidth:200px;dialogHeight:50px;status:0;help:0;resizable:no;scroll:no" ) } </script> </head> <body> <button onclick="myalert( 'Text', 'Title')">Click Me</button> </body> </html>