??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲日韩欧美视频,国产精品久久激情,国产精品扒开腿做爽爽爽视频http://www2.blogjava.net/javainthinking/category/1566.html熊炼的个性空间和java学习(fn)之旅zh-cnWed, 28 Feb 2007 18:39:04 GMTWed, 28 Feb 2007 18:39:04 GMT60制作Javascript弹出H口技巧九(ji)?/title><link>http://www.aygfsteel.com/javainthinking/articles/5362.html</link><dc:creator>熊炼的个性空间和java学习(fn)之旅</dc:creator><author>熊炼的个性空间和java学习(fn)之旅</author><pubDate>Tue, 31 May 2005 04:57:00 GMT</pubDate><guid>http://www.aygfsteel.com/javainthinking/articles/5362.html</guid><wfw:comment>http://www.aygfsteel.com/javainthinking/comments/5362.html</wfw:comment><comments>http://www.aygfsteel.com/javainthinking/articles/5362.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javainthinking/comments/commentRss/5362.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javainthinking/services/trackbacks/5362.html</trackback:ping><description><![CDATA[<SPAN id=ArticleContent1_ArticleContent1_lblContent><FONT face=宋体><FONT size=2><STRONG>制作Javascript弹出H口技巧九(ji)?BR><BR></STRONG><FONT style="BACKGROUND-COLOR: #ffcccc" color=#0033ff>1、最基本的弹出窗口代?/FONT> <BR><BR>  其实代码非常单:(x) <BR><BR>  < SCRIPT LANGUAGE="javascript"><BR>  < !--<BR>  window.open ("page.html")<BR>  -- ><BR>  < /SCRIPT> <BR><BR>  因ؓ(f)q是一DJavascript代码Q所以它们应该放?lt; SCRIPT LANGUAGE="javascript">之间?< !-- ?-->是对一些版本低的浏览器起作用,在这些老浏览器中不?x)将标签中的代码作?f)文本昄出来。要Lq个好习(fn)惯啊?<BR><BR>  window.open ("page.html") 用于控制弹出新的H口page.htmlQ如果page.html不与ȝ口在同一路径下,前面应写明\径,l对路径(http://)和相对\?../)均可?<BR><BR>  用单引号和双引号都可以,只是不要L(fng)?<BR><BR>  q一D代码可以加入HTML的Q意位|,< head>?lt; /head>之间可以Q?lt; body>?lt; /body>也可以,前早执行Q尤其是面代码长,又想佉K面早点弹出就量往前放?也可以,前早执行Q尤其是面代码长,又想佉K面早点弹出就量往前放?<BR><BR>  <FONT style="BACKGROUND-COLOR: #ffcccc" color=#3333ff>2、设|后的弹出窗?/FONT> <BR><BR>  下面再说一说弹出窗口的讄。只要再往上面的代码中加一点东西就可以了。我们来定制q个弹出的窗口的外观Q尺寸大,弹出的位|以适应该页面的具体情况?<BR><BR>  < SCRIPT LANGUAGE="javascript"><BR>  < !--<BR><BR>  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")<BR><BR>  //写成一?BR>  --><BR>  < /SCRIPT> <BR><BR>  参数解释Q?<BR><BR>  < SCRIPT LANGUAGE="javascript"> js脚本开始;<BR><BR>  window.open 弹出新窗口的命o(h)Q?BR>  "page.html" 弹出H口的文件名Q?BR>  "newwindow" 弹出H口的名字(不是文g名)Q非必须Q可用空"代替Q?BR>  height=100 H口高度Q?BR>  width=400 H口宽度Q?BR>  top=0 H口距离屏幕上方的象素|<BR>  left=0 H口距离屏幕左侧的象素|<BR>  toolbar=no 是否昄工具栏,yes为显C;<BR>  menubarQscrollbars 表示菜单栏和滚动栏?BR>  resizable=no 是否允许改变H口大小Qyes为允许;<BR>  location=no 是否昄地址栏,yes为允许;<BR>  status=no 是否昄状态栏内的信息Q通常是文件已?打开Q,yes为允许;<BR>  < /SCRIPT> js脚本l束 <BR><BR>  <FONT style="BACKGROUND-COLOR: #ffcccc" color=#0033ff>3、用函数控制弹出H口</FONT> <BR><BR>  下面是一个完整的代码Q?<BR><BR>  < html><BR>  < head><BR>  < script LANGUAGE="JavaScript"><BR>  < !--<BR>  function openwin() {<BR><BR>  window.open ("page.html", "newwindow", "height=100, width=400, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")<BR><BR>  //写成一?BR><BR>  }<BR><BR>  //--><BR>  < /script><BR>  < /head><BR><BR>  < body onload="openwin()"> <BR><BR>  ...L的页面内?.. <BR><BR>  < /body><BR>  < /html><BR><BR>  q里定义了一个函数openwin(),函数内容是打开一个窗口。在调用它之前没有Q何用途?BR><BR>  怎么调用呢?<BR><BR>  Ҏ(gu)一Q?lt; body onload="openwin()"> 览器读面时弹出窗口;<BR><BR>  Ҏ(gu)二:(x)< body onunload="openwin()"> 览器离开面时弹出窗口;<BR><BR>  Ҏ(gu)三:(x)用一个连接调用:(x)< a href="#" onclick="openwin()">打开一个窗?lt; /a><BR><BR>  注意Q用的"#"是虚q接?BR><BR>  Ҏ(gu)四:(x)用一个按钮调用:(x)< input type="button" onclick="openwin()" value="打开H口"> <BR><BR>  <FONT style="BACKGROUND-COLOR: #ffcccc"><FONT color=#0033ff>4、同时弹?个窗?/FONT> </FONT><BR><BR>  Ҏ(gu)代码E微改动一下:(x)<BR><BR>  < script LANGUAGE="JavaScript"><BR>  < !--<BR>  function openwin() {<BR><BR>  window.open ("page.html", "newwindow", "height=100, width=100, top=0, left=0,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")<BR><BR>  //写成一?BR><BR>  window.open ("page2.html", "newwindow2", "height=100, width=100, top=100, left=100,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")<BR><BR>  //写成一?BR>  }<BR><BR>  //--><BR>  < /script><BR><BR>  为避免弹出的2个窗口覆盖,用top和left控制一下弹出的位置不要怺覆盖卛_。最后用上面说过的四U方法调用即可?BR><BR>  注意Q?个窗口的name(newwindows和newwindow2)不要相同Q或者干脆全部ؓ(f)I。OKQ?BR><BR>  <FONT style="BACKGROUND-COLOR: #ffcccc" color=#0033ff>5、主H口打开文g1.htmQ同时弹出小H口page.html</FONT><BR><BR>  如下代码加入ȝ?lt; head>区:(x)<BR><BR>  < script language="javascript"><BR>  < !--<BR>  function openwin() {<BR><BR>  window.open("page.html","","width=200,height=200")<BR><BR>  }<BR><BR>  //--><BR><BR>  < /script><BR><BR>  加入< body>区:(x)<BR><BR>  < a href="1.htm" onclick="openwin()">open< /a>卛_<BR><BR>  <FONT style="BACKGROUND-COLOR: #ffcccc" color=#0033ff>6、弹出的H口之定时关闭控?<BR></FONT><BR>  下面我们再对弹出的窗口进行一些控Ӟ效果更好了。如果我们再一段代码加入弹出的页?注意是加入到page.html的HTML中,可不是主面中,否则...)Q让?0U后自动关闭是不是更酷了Q?<BR><BR>  首先Q将如下代码加入page.html文g?lt; head>区:(x)<BR><BR>  < script language="JavaScript"><BR><BR>  function closeit() {<BR><BR>  setTimeout("self.close()",10000) //毫秒<BR><BR>  }<BR><BR>  < /script><BR><BR>  然后Q再?lt; body onload="closeit()"> q一句话代替page.html?有的< BODY>q一句就可以了?q一句话千万不要忘记写啊Q这一句的作用是调用关闭窗口的代码Q?0U钟后就自行关闭该窗口? <BR><BR>  <FONT style="BACKGROUND-COLOR: #ffcccc" color=#0033ff>7、在弹出H口中加上一个关闭按?/FONT> <BR><BR>  < FORM><BR>  < INPUT TYPE="BUTTON" VALUE="关闭" onClick="window.close()"><BR>  < /FORM> <BR><BR>  呵呵Q现在更加完了Q?<BR><BR>  <FONT style="BACKGROUND-COLOR: #ffcccc" color=#0033ff>8、网内包含的弹出窗?-一个页面两个窗?<BR></FONT><BR>  上面的例子都包含两个H口Q一个是ȝ口,另一个是弹出的小H口。通过下面的例子,你可以在一个页面内完成上面的效果?<BR><BR>  < html><BR>  < head><BR><BR>  < SCRIPT LANGUAGE="JavaScript"><BR>  function openwin()<BR><BR>  {<BR><BR>  OpenWindow=window.open("", "newwin", "height=250, width=250,toolbar=no,scrollbars="+scroll+",menubar=no");<BR><BR>  //写成一?BR><BR>  OpenWindow.document.write("< TITLE>例子< /TITLE>")<BR>  OpenWindow.document.write("< BODY BGCOLOR=#ffffff>")<BR>  OpenWindow.document.write("< h1>Hello!< /h1>")<BR>  OpenWindow.document.write("New window opened!")<BR>  OpenWindow.document.write("< /BODY>")<BR>  OpenWindow.document.write("< /HTML>")<BR>  OpenWindow.document.close()<BR><BR>  }<BR>  < /SCRIPT><BR><BR>  < /head><BR>  < body><BR><BR>  < a href="#" onclick="openwin()">打开一个窗?lt; /a><BR>  < input type="button" onclick="openwin()" value="打开H口"><BR>  < /body><BR>  < /html><BR><BR>  看看OpenWindow.document.write()里面的代码不是标准的HTML吗?只要按照格式写更多的行即可。千万注意多一个标{或一个标{ְ?x)出现错误。记得用OpenWindow.document.close()l束啊?<BR><BR>  <FONT style="BACKGROUND-COLOR: #ffcccc" color=#0033ff>9、终极应?-弹出的窗口之Cookie控制</FONT> <BR><BR>  回想一下,上面的弹出窗口虽焉Q但是有一点小毛病(沉浸在喜(zhn)之中,一定没有发现吧Q?比如你将上面的脚本放在一个需要频J?q的面?例如首页)Q那么每ơ刷新这个页面,H口都会(x)弹出一ơ,是不是非常烦人?:-( <BR><BR>  有解决的办法吗?当然有!我们使用cookie来控制一下就可以了。首先,如下代码加入主面HTML?lt; HEAD>区:(x)<BR><BR>  < script><BR>  function openwin(){<BR><BR>  window.open("page.html","","width=200,height=200")<BR><BR>  }<BR><BR>  function get_cookie(Name) {<BR><BR>  var search = Name + "=" var returnvalue = "";<BR>  if (document.cookie.length > 0) {<BR>  offset = document.cookie.indexOf(search)<BR>  if (offset != -1) {<BR>  offset += search.length<BR>  end = document.cookie.indexOf(";", offset);<BR><BR>  if (end == -1)<BR>  end = document.cookie.length;<BR>  returnvalue=unescape(document.cookie.substring(offset, end))<BR><BR>  }<BR><BR>  }<BR><BR>  return returnvalue;<BR><BR>  }<BR><BR>  function loadpopup(){<BR>  if (get_cookie("popped")=="){<BR><BR>  openwin()<BR>  document.cookie="popped=yes"<BR><BR>  }<BR>  }<BR>  < /script><BR><BR>  然后Q用< body onload="loadpopup()">Q注意不是openwin而是loadpop啊!Q替换主面中原有的< BODY>q一句即可。你可以试着h一下这个页面或重新q入该页面,H口再也不会(x)弹出了。真正的Pop-Only-OnceQ?BR>原文q接如下Q?A >http://dev.csdn.net/article/46/46507.shtm</A></FONT></FONT></SPAN><img src ="http://www.aygfsteel.com/javainthinking/aggbug/5362.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javainthinking/" target="_blank">熊炼的个性空间和java学习(fn)之旅</a> 2005-05-31 12:57 <a href="http://www.aygfsteel.com/javainthinking/articles/5362.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>做的东西弹出一个窗口处理某些动作后h父窗?/title><link>http://www.aygfsteel.com/javainthinking/articles/5361.html</link><dc:creator>熊炼的个性空间和java学习(fn)之旅</dc:creator><author>熊炼的个性空间和java学习(fn)之旅</author><pubDate>Tue, 31 May 2005 04:53:00 GMT</pubDate><guid>http://www.aygfsteel.com/javainthinking/articles/5361.html</guid><wfw:comment>http://www.aygfsteel.com/javainthinking/comments/5361.html</wfw:comment><comments>http://www.aygfsteel.com/javainthinking/articles/5361.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/javainthinking/comments/commentRss/5361.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/javainthinking/services/trackbacks/5361.html</trackback:ping><description><![CDATA[原文q接Q?BR><A >做的东西弹出一个窗口处理某些动作后h父窗?BR>?/A><BR>window.opener.location.reload();<BR>h<BR>如果父窗口在此之前如果有q提交数据的动作Q则?x)出现这么个讨厌的对话?BR>“不重新发送信息,则无法刷新网?BR>痛苦......<BR>CSDN搜烦未果(有几贴都是用Response.Redirect的方法,但我q里是刷父窗??BR>痛苦.<BR>........<BR>L?A ><STRIKE>本?/STRIKE></A> 后找到办?BR>?BR>window.opener.location.href=window.opener.location.href<BR>d斎ͼ其实是重定位了一下)父窗?BR>可行?BR><img src ="http://www.aygfsteel.com/javainthinking/aggbug/5361.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/javainthinking/" target="_blank">熊炼的个性空间和java学习(fn)之旅</a> 2005-05-31 12:53 <a href="http://www.aygfsteel.com/javainthinking/articles/5361.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank">ǹ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Դ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ƽ</a>| <a href="http://" target="_blank">ϳ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ݳ</a>| <a href="http://" target="_blank">Ԫ</a>| <a href="http://" target="_blank">㶫ʡ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">«ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">͸</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ԫ</a>| <a href="http://" target="_blank">׸</a>| <a href="http://" target="_blank">ٹ</a>| <a href="http://" target="_blank">Ϫ</a>| <a href="http://" target="_blank">żҽ</a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank">ʡ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>