How to make a popup window?

2007-05-13 1:19 am
How to make a popup window?
Please give me the html.
I want the window's name to be Congratulations
I want the text to be Congratulations!
I want it to pop out once.

回答 (1)

2007-05-13 1:46 am
✔ 最佳答案
This is the simplest implementation, although it cannot specify the window title:

<script language="JavaScript" >
alert('Congratulations!');
</script >

2007-05-12 18:06:09 補充:
You may write a function, call it as needed:<script language="JavaScript">function congrat(){ alert('Congratulations!');}</script>Call it:<script language="JavaScript">……if (……) congrat();else …………</script>

2007-05-12 20:52:44 補充:
Please ignore the above scrambled code.<script language="JavaScript">function congrat(){ alert('Congratulations!');}</script>Call it by:<script language="JavaScript">……if (……) congrat();else …………</script>

2007-05-12 20:55:43 補充:
Please ignore the above scrambled code.<script language="JavaScript" >function congrat(){ alert('Congratulations!');}</script >Call it by:<script language="JavaScript" >……if (……) congrat();else …………</script >
參考: My experience


收錄日期: 2021-04-23 21:46:04
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070512000051KK03518

檢視 Wayback Machine 備份