<a href='javascript:;' onclick="javsscript:open_view('?c_id=<%response.write cid%>&s_id=<%response.write sid%>&action=view&id=<%response.write nid%>',1);">帮帮我吧</a>
我想让弹出的窗口没有菜单栏和工具条,请问怎么做到?谢谢!
〈SCRIPT LANGUAGE="javascript"〉 〈!-- window.open ('page.html') --〉 〈/SCRIPT〉 〈SCRIPT LANGUAGE="javascript"〉 〈!-- window.open ('page.html', 'newwindow', 'height=100, width=400, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no,status=no') //写成一行 --〉 〈/SCRIPT〉 参数解释: 〈SCRIPT LANGUAGE="javascript"〉 js脚本开始; window.open 弹出新窗口的命令; 'page.html' 弹出窗口的文件名; 'newwindow' 弹出窗口的名字(不是文件名),非必须,可用空''代替; height=100 窗口高度; width=400 窗口宽度; top=0 窗口距离屏幕上方的象素值; left=0 窗口距离屏幕左侧的象素值; toolbar=no 是否显示工具栏,yes为显示; menubar,scrollbars 表示菜单栏和滚动栏。 resizable=no 是否允许改变窗口大小,yes为允许; location=no 是否显示地址栏,yes为允许; status=no 是否显示状态栏内的信息(通常是文件已经打开),yes为允许; 〈/SCRIPT〉 js脚本结束 |
[此贴子已经被作者于2005-4-18 8:51:54编辑过]
我改了半天也没改好,下面是我的那个文件 <% sub gallery_new(g_tit,gtype,n_num,w_num) dim rs,sql,pic_temp,pic,name,ut response.write "<table cellspacing=1 cellpadding=1 class=table0>" & _ "<tr><td class=td> "&img_small(sk_jt)&" <a href='gallery.asp?action=">ype&"'><font class="&sk_class&">"&g_tit&"</font></a></tr>" & _ "<tr><td class=bg_1 align=center><table border=0 width='100%'><tr><td height=5></td></tr><tr align=center>" sql="select top "&n_num&" id,c_id,s_id,types,spic,pic,name,counter,power,emoney from gallery where hidden=1 and types='">ype&"' order by id desc" set rs=conn.execute(sql) do while not rs.eof if gtype="paste" then pic=rs("pic") else pic=rs("spic") end if name=rs("name") ut="gallery.asp?types=view&action=">ype&"&c_id="&rs("c_id")&"&s_id="&rs("s_id")&"&id="&rs("id") pic_temp="<table border=0>" & _ "<tr><td align=center><a href='javascript:;' onclick=""javascript:open_view('"&ut&"',1);""><script language=javascript>pic_url('"&pic&"',1)</script></a></td></tr>" & _ "<tr><td align=center><a href='javascript:;' onclick=""javascript:open_view('"&ut&"',1);"" class=blue><b>"&objv7.code_html(name,1,w_num)&"</b></a></td></tr>" if gtype<>"paste" then pic_temp=pic_temp&"<tr><td align=center>"&m_unit&":<font class=red_3>"&rs("emoney")&"</font> 人气:<font class=red>"&rs("counter")&"</font></td></tr>" & _ "<tr><td align=center>"&power_pic(0,rs("power"),0)&"</td></tr>" end if pic_temp=pic_temp&"</table>" response.write "<td><script language=javascript>pic_fk(1,1)</script>"&pic_temp&"<script language=javascript>pic_fk(2,1)</script></td>" rs.movenext loop rs.close:set rs=nothing response.write "</tr><tr><td height=3></td></tr></table></td></tr></table>" end sub
sub website_new(wtype,t_num,w_num,w_jt) dim rs,wtit,wname,wjt if w_jt<>"" then wjt=img_small(w_jt) sql="select top "&t_num&" id,c_id,s_id,name from website where hidden=1 " select case wtype case "hot" wtit="热门站点" sql=sql&"order by counter desc,id desc" case "top" wtit="推荐站点" sql=sql&"and isgood=1 order by id desc" case else wtit="最新站点" sql=sql&"order by id desc" end select response.write "<table cellspacing=1 cellpadding=1 class=table0>" & _ "<tr><td class=td> "&img_small(sk_jt)&" <font class="&sk_class&">"&wtit&"</font></td></tr>" & _ "<tr><td class=bg_1 align=center><table border=0 width='100%'>" set rs=conn.execute(sql) do while not rs.eof wname=rs("name") response.write "<tr><td height="&space_mod&">"&wjt&"<a href='javascript:;' onclick=""javascript:open_view('website.asp?c_id="&rs("c_id")&"&s_id="&rs("s_id")&"&action=view&id="&rs("id")&"',1);"" title='"&wname&"'>"&objv7.code_html(wname,1,w_num)&"</a></td></tr>" rs.movenext loop rs.close:set rs=nothing response.write "</table></td></tr></table>" end sub %> 请问在那里,如何设置才能是弹出的窗口没有工具栏和菜单栏,谢谢各位前辈了!
[此贴子已经被作者于2005-4-22 0:19:18编辑过]
<a href="javascript:;" onClick="expandingWindow('http://www.sina.com.cn')">打开新浪网站</a>
<SCRIPT LANGUAGE="JavaScript"> function expandingWindow(website) { var heightspeed = 5; var widthspeed = 10; var leftdist = 0; var topdist = 0; var winwidth = 400 - leftdist; var winheight = 500 - topdist; var sizer = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=1,height=1,scrollbars=no,toolbar=no,location=no,menubar=no,resizable=no,status=no"); for (sizeheight = 1; sizeheight < 500; sizeheight += heightspeed) { sizer.resizeTo("1", sizeheight); } for (sizewidth = 1; sizewidth < 400; sizewidth += widthspeed) { sizer.resizeTo(sizewidth, sizeheight); } sizer.location = website; } </script>
我设计的 你看看对你有没有帮助 在结合上面的窗口的属性理解一下window.open()中的各个参数的意思
[此贴子已经被作者于2005-4-22 11:22:24编辑过]