|
![](/images/resource/spacer.gif) |
|
สอบถามเรื่องสคริปจาวา อยากจะเพิ่มคำสั่งให้เปิด popup ควรเขียนยังไงค่ะ |
|
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
อยากได้เหมือนกันครับ![](/images/bbcode/lol.gif?v=1001)
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2010-08-06 15:06:29 |
By :
(o_O) |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
ch.php
Code (JavaScript)
<html>
<head>
<title>JavaScript Window Close Example </title>
</head>
<SCRIPT language="JavaScript1.2">
function popuponclick()
{
my_window = window.open("ch1.php",
"mywindow","status=1,width=350,height=150");
}
function popuponclickP()
{
my_windowP = window.open("ch2.php",
"mywindowP","status=1,width=350,height=150");
}
function closepopup()
{
if(false == my_window.closed)
{
my_window.close ();
my_windowP.close();
}
else
{
alert('Window already closed!');
}
}
</SCRIPT>
<body>
<P>
<A href="javascript: popuponclick()">Open Popup Window</A>
</P>
<P>
<A href="javascript: popuponclickP()">Open Popup WindowP</A>
</P>
<P>
<A href="javascript: closepopup()" onClick="window.close();">Close the Popup Window</A>
</P>
</body>
</html>
ch1.php
Code (JavaScript)
<? echo "hello"; ?>
ch2.php
Code (JavaScript)
<? echo "hi"; ?>
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2010-08-06 16:00:04 |
By :
poy213 |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
![](/images/resource/viewboard_01.gif?v=1001) |
|
|
![](/images/resource/viewboard_03.gif?v=1001) |
![](/images/resource/viewboard_04.gif?v=1001) |
|
ถ้าใช้ dreamweaver ให้เข้าไปที่ Window > Behaviors หรือกด Shift + F4 จะมีตัวช่วยขึ้นมาครับ
|
![](/images/resource/blockviewtopic_01.gif?v=1001) |
![](/images/resource/blockviewtopic_02.gif?v=1001) |
![](/images/resource/blockviewtopic_03.gif?v=1001) |
![](/images/resource/blockviewtopic_04.gif?v=1001) |
Date :
2010-08-06 18:01:31 |
By :
Black_Hawk |
|
![](/images/resource/blockviewtopic_06.gif?v=1001) |
![](/images/resource/blockviewtopic_07.gif?v=1001) |
![](/images/resource/blockviewtopic_08.gif?v=1001) |
![](/images/resource/blockviewtopic_09.gif?v=1001) |
|
|
![](/images/resource/viewboard_06.gif?v=1001) |
![](/images/resource/viewboard_07.gif?v=1001) |
|
![](/images/resource/viewboard_08.jpg?v=1001) |
![](/images/resource/viewboard_09.gif?v=1001) |
|
|
|
![](/images/digitalocean-banner.jpg)
|
Load balance : Server 02
|