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

javascriptµ÷Óø¸´°¿Ú£¨¸¸Ò³Ã棩µÄ·½·¨

 
window.parentÓëwindow.openerµÄÇø±ð javascriptµ÷ÓÃÖ÷´°¿Ú·½·¨
1£º   window.parent ÊÇiframeÒ³Ãæµ÷Óø¸Ò³Ãæ¶ÔÏó
¾ÙÀý:
a.html
Html´úÂë <html>  
    <head><title>¸¸Ò³Ãæ</title></head>  
<body>  
    <form name="form1" id="form1">  
         <input type="text" name="username" id="username"/>  
    </form>  
    <iframe src="b.html" width=100%></iframe>  
</body>  
</html> 
Èç¹ûÎÒÃÇÐèÒªÔÚb.htmÖÐÒª¶Ôa.htmÖеÄusernameÎı¾¿ò¸³Öµ£¬¾ÍÈçºÜ¶àÉÏ´«¹¦ÄÜ£¬ÉÏ´«¹¦ÄÜÒ³ÔÚIfrmaeÖУ¬ÉÏ´«³É¹¦ºó°ÑÉÏ´«ºóµÄ·¾¶·ÅÈ븸ҳÃæµÄÎı¾¿òÖÐ
ÎÒÃÇÓ¦¸ÃÔÚb.htmlÖÐд
Html´úÂë
<script type="text/javascript">  
    var _parentWin = window.parent ;   
    _parentWin.form1.username.value = "xxxx" ;   
</script> 
 
ʵÀýµØÖ·£º  http://www.cnspry.cn/blog/attachments/window.parent ʵÀý/a.html
Ô´Â룺
1.a.html
Html´úÂë
<html>  
<head>  
    <title>Ö÷Ò³Ãæ</title>  
    <script>  
        /** Ϊ²âÊÔIFrame×Ó´°¿Úµ÷Óø¸´°¿ÚµÄÈ«¾Ö±äÁ¿¶øÌí¼ÓµÄ²âÊÔ±äÁ¿ */   
        var parentVairous = "Ϊ²âÊÔIFrame×Ó´°¿Úµ÷Óø¸´°¿ÚµÄÈ«¾Ö±äÁ¿¶øÌí¼ÓµÄ²âÊÔ±äÁ¿";   
        function parentInvokeIFrame()   
        {   
                var iframeTest = document.frames["iframeTest"]; //ʹÓÃdocument.getElementById("iframeTest");ͬÑù¿ÉÒÔ   
&n


Ïà¹ØÎĵµ£º

ÕÅТÏêjavascript½²×ù±Ê¼Ç¶þ

Ò»£¬JavaScriptÖеı£Áô¹Ø¼ü×Ö
      abstract        extends         instanceof         static           & ......

[Javascript]typeofº¯ÊýÓëconstructorÊôÐÔ

½ñÌìżȻ¿´µ½ÁËconstructorÕâ¸ö¶«¶«£¬²»Ã÷°×ÓÃ;¡£Õҵ㶫Î÷±¸Íü
typeofº¯ÊýµÄÓ÷¨¿ÉÄܲ»ÓÃÎÒ¶à˵£¬´ó¼Ò¶¼ÖªµÀÔõôÓ᣶øconstructorÊôÐÔ´ó¼Ò¿ÉÄܾÍÄ°Éúµã¡£ÔÚ¡¶¾«Í¨JavaScript¡·Õâ±¾ÊéÖÐÓÐÌáµ½constructµÄÓ÷¨£¬µ«ÎÒÓÃ×Ô¼ºµÄ¼¸¸öä¯ÀÀÆ÷£¨IE7.0 / Firefox1.9 / Opera9.50£©²âÊԵĽá¹ûÈ´ºÍÊéÉÏ˵µÄ²»Ò»Ñù¡£µ«ÊÇÈÔÈ»ÊÇÓÐ°ì·¨Í ......

JavaScript¶¯Ì¬Ìí¼Ó|°ó¶¨Ê¼þ

1£¬²»´ø²ÎÊýµÄʼþ£º
Á½ÖÖ·½Ê½£ºÖ±½Ó¸ø¶ÔÏóÌí¼Óʼþ,½ÚµãÌí¼Óʼþ
ÀýÈç¸øÒ»¸öidΪtab1µÄÌí¼Óonclickʼþ
µÚÒ»ÖÖÇé¿ö£º
var
 t 
=
 document.getElementById(
"
NewTitle
"
);
t.onclick 
=
 
function
 showmsg(){
    alert(
'
Hello!Wor ......

javascript >java

1.JSP
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'index.jsp' starting page</title>
 <meta http-equiv= ......

JavaScriptÏÞÖÆtextarea³¤¶È

ÓÉÓÚTEXTAREAûÓÐmaxlength,²»ÄÜÕâÑùÏÞÖÆtextarea³¤¶È£¬ µ«Í¨¹ýJAVASCRIPT ¾ÍÄÜʵÏÖµ½
<mce:script type="text/javascript"><!--

function limitLength(obj, length) {
var desc = obj.value;
obj.value = substr(obj.value,length);
}
function substr(str,length){
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ