这是一些常用的JavaScript的特效的源码和教程
源代码在线查看: 12.19 弹出窗口生成器.htm
弹出窗口生成器
BODY {font-family:"宋体";; font-size: 9pt; margin-top: 0px}
.pt9 { font-family: "宋体"; font-size: 9pt}
td { font-size: 9pt }
-->
function popup(url, name, width, height)
{
settings=
"toolbar=yes,location=yes,directories=yes,"+
"status=no,menubar=no,scrollbars=yes,"+
"resizable=yes,width="+width+",height="+height;
MyNewWindow=window.open(""+url,name,settings);
}
function testmywindow()
{
result=new Array(7);
for (i=1; i with (document.detectform)
{
if (R1[0].checked) {result[1]="yes"};
if (R2[0].checked) {result[2]="yes"};
if (R3[0].checked) {result[3]="yes"};
if (R4[0].checked) {result[4]="yes"};
if (R5[0].checked) {result[5]="yes"};
if (R6[0].checked) {result[6]="yes"};
if (R7[0].checked) {result[7]="yes"};
settings="toolbar="+result[1]+",location="+result[2]+",directories="+result[3]+",status="+result[4]+",menubar="+result[5]+",scrollbars="+result[6]+",resizable="+result[7]+",width="+newwidth.value+",height="+newheight.value;
code.value="\这里是打开窗口的代码";
}
}
弹出窗口生成器
打开哪个窗口?
type="text" name="url" size="30" value="http://www.google.com">
窗口设置参数
toolbar
=
yes
checked>
| no
location
=
yes
checked>
| no
directories
=
yes
checked>
| no
status
=
yes
checked>
| no
menubar
=
yes
checked>
| no
scrollbars
=
yes
checked>
| no
resizable
=
yes
name="R7">
| no
width
=
value="600">
height
=
value="300">
type="button" value="生成代码" name="B1" onClick="testmywindow()" class="pt9">
这里是生成的代码: