Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JavaScriptÖеÄWindow´°¿Ú¶ÔÏó

JavaScriptÖеÄWindow´°¿Ú¶ÔÏó
ËûÊÇJavaScriptÖÐ×î´óµÄ¶ÔÏó£¬ËüÃèÊöµÄÊÇÒ»¸öä¯ÀÀÆ÷´°¿Ú¡£Ò»°ãÒªÒýÓÃËüµÄÊôÐԺͷ½·¨Ê±£¬²»ÐèÒªÓÓwindow.xxx”ÕâÖÖÐÎʽ£¬¶øÖ±½ÓʹÓÓxxx”¡£Ò»¸ö¿ò¼ÜÒ³ÃæÒ²ÊÇÒ»¸ö´°¿Ú¡£
Window´°¿Ú¶ÔÏóÓÐÈçÏÂÊôÐÔ£º
name ´°¿ÚµÄÃû³Æ£¬ÓÉ´ò¿ªËüµÄÁ¬½Ó£¨<a target="...">£©»ò¿ò¼ÜÒ³£¨<frame name="...">£©»òijһ¸ö´°¿Úµ÷ÓÃµÄ open() ·½·¨£¨¼ûÏ£©¾ö¶¨¡£Ò»°ãÎÒÃDz»»áÓÃÕâ¸öÊôÐÔ¡£
status Ö¸´°¿ÚÏ·½µÄ“״̬À¸”ËùÏÔʾµÄÄÚÈÝ¡£Í¨¹ý¶Ô status ¸³Öµ£¬¿ÉÒԸıä״̬À¸µÄÏÔʾ¡£
opener
Ó÷¨£ºwindow.opener£»·µ»Ø´ò¿ª±¾´°¿ÚµÄ´°¿Ú¶ÔÏó¡£×¢Ò⣺·µ»ØµÄÊÇÒ»¸ö´°¿Ú¶ÔÏó¡£Èç¹û´°¿Ú²»ÊÇÓÉÆäËû´°¿Ú´ò¿ªµÄ£¬ÔÚ Netscape
ÖÐÕâ¸öÊôÐÔ·µ»Ø null£»ÔÚ IE Öзµ»Ø“δ¶¨Ò唣¨undefined£©¡£undefined ÔÚÒ»¶¨³Ì¶ÈÉϵÈÓÚ
null¡£×¢Ò⣺undefined ²»ÊÇ JavaScript ³£Êý£¬Èç¹ûÄãÆóͼʹÓÓundefined”£¬ÄǾÍÕæµÄ·µ»Ø“䶨Òå”ÁË¡£
self Ö¸´°¿Ú±¾Éí£¬Ëü·µ»ØµÄ¶ÔÏó¸ú window ¶ÔÏóÊÇһģһÑùµÄ¡£×î³£ÓõÄÊÇ“self.close()”£¬·ÅÔÚ<a>±ê¼ÇÖУº“<a href="javascript:self.close()">¹Ø±Õ´°¿Ú</a>”¡£
parent ·µ»Ø´°¿ÚËùÊôµÄ¿ò¼ÜÒ³¶ÔÏó¡£
top ·µ»ØÕ¼¾ÝÕû¸öä¯ÀÀÆ÷´°¿ÚµÄ×¶ËµÄ¿ò¼ÜÒ³¶ÔÏó¡£
history ÀúÊ·¶ÔÏ󣬼ûÏ¡£
location µØÖ·¶ÔÏ󣬼ûÏ¡£
document Îĵµ¶ÔÏ󣬼ûÏ¡£
Window´°¿Ú¶ÔÏóÓÐÈçÏ·½·¨£º
µÚÒ»¸ö·½·¨ÊÇopen()
´ò¿ªÒ»¸ö´°¿Ú¡£
Ó÷¨£º
open(<URL×Ö·û´®>, <´°¿ÚÃû³Æ×Ö·û´®>, <²ÎÊý×Ö·û´®>);
˵Ã÷£º
<URL×Ö·û´®>£ºÃèÊöËù´ò¿ªµÄ´°¿Ú´ò¿ªÄÄÒ»¸öÍøÒ³¡£Èç¹ûÁô¿Õ£¨''£©£¬Ôò²»´ò¿ªÈÎÒâÍøÒ³¡£
<´°¿ÚÃû³Æ×Ö·û´®>£ºÃèÊö±»´ò¿ªµÄ´°¿ÚµÄÃû³Æ£¨window.name£©£¬¿ÉÒÔʹÓÃ'_top'¡¢'_blank'µÈÄÚ½¨Ãû³Æ¡£ÕâÀïµÄÃû³Æ¸ú“<a href="..." target="...">”ÀïµÄ“target”ÊôÐÔÊÇÒ»ÑùµÄ¡£
<²ÎÊý×Ö·û´®>£ºÃèÊö±»´ò¿ªµÄ´°¿ÚµÄÑùò¡£Èç¹ûÖ»ÐèÒª´ò¿ªÒ»¸öÆÕͨ´°¿Ú£¬¸Ã×Ö·û´®Áô¿Õ£¨''£©£¬Èç¹ûÒªÖ¸¶¨Ñùò£¬¾ÍÔÚ×Ö·û´®ÀïдÉÏÒ»µ½¶à¸ö²ÎÊý£¬²ÎÊýÖ®¼äÓöººÅ¸ô¿ª¡£
Àý£º´ò¿ªÒ»¸ö 400 x 100 µÄ¸É¾»µÄ´°¿Ú£º
open('','_blank','width=400,height=100,menubar=no,toolbar=no,
location=no,directories=no,status=no, scrollbars=yes,


Ïà¹ØÎĵµ£º

ÌìÆøÔ¤±¨ WebService Web JavaScript µ÷ÓôúÂë

javascript, webservice, ÌìÆøÔ¤±¨
ÔËÐÐÑÝʾ£¬Çëµã»÷ÕâÀ>>ÌìÆøÔ¤±¨ WebService JavaScript WebÒ³Ãæµ÷ÓôúÂ룬תÔؼ°Ê¹ÓøôúÂ룬Çë±£Áô×÷ÕßÐÅÏ¢£¬ÆäËü²¿·ÖÄú¿ÉÈÎÒâÐ޸ġ£
Ô´´ú碼£º
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCT ......

javascript¼òµ¥ÑéÖ¤

<html>
  <head>
    <base href="<%=basePath%>">
   
 <script type="text/javascript">
  function check(){
   var name1 = document.form1.name1.value;
   
   var passwor ......

JavaScript »ñµÃÒ³ÃæÇøÓò´óСµÄ´úÂë

ÍøÒ³¿É¼ûÇøÓò¿í£º document.body.clientWidth
ÍøÒ³¿É¼ûÇøÓò¸ß£º document.body.clientHeight
ÍøÒ³¿É¼ûÇøÓò¿í£º document.body.offsetWidth (°üÀ¨±ßÏߵĿí)
ÍøÒ³¿É¼ûÇøÓò¸ß£º document.body.offsetHeight (°üÀ¨±ßÏߵĸß)
ÍøÒ³ÕýÎÄÈ«ÎÄ¿í£º document.body.scrollWidth
ÍøÒ³ÕýÎÄÈ«Îĸߣº document.body.scrollHeight
ÍøÒ ......

javascriptÔÚalert֮ǰתÒåµ¥ÒýºÅ

¶ÔÓÚ1¸öµ¥ÒýºÅ£¬ÔòתÒå¸Ãµ¥ÒýºÅ
¶ÔÓÚ1¸ö·´Ð±¸Ü¸ú1¸öµ¥ÒýºÅ£¬Ôò²»¹ÜËü¡£
¶ÔÓÚ2¸ö¼°ÒÔÉϵķ´Ð±¸Ü¼ÓÒ»¸öµ¥ÒýºÅ£¬Ôò·Ö±ð¶Ôÿ¸ö·´Ð±¸ÜºÍµ¥ÒýºÅ¶¼½øÐÐתÒ壬¼´ ʹ·´Ð±¸ÜÊýÄ¿±£³Ö²»±ä£¬ ²¢×ªÒåµ¥ÒýºÅ¡£
 

/// <summary>
/// ¶ÔÓÚµ¥ÒýºÅ¶øÑÔ£¬ÈôÇ°ÃæÓÐżÊý¸ö·´Ð±¸ÜÔòÒì³££¬ÆæÊý¸ö·´Ð±¸ÜÔòÕý³£
/// < ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ