JavaScript¶ÔframesetµÄ²Ù×÷×ܽá
1 ¿ò¼Ü±à³Ì¸ÅÊö
Ò»¸öHtml Ò³Ãæ¿ÉÒÔÓÐÒ»¸ö»ò¶à¸ö×Ó¿ò¼Ü£¬ÕâЩ×Ó¿ò¼ÜÒÔ<iframe>À´±ê¼Ç£¬ÓÃÀ´ÏÔʾһ
¸ö¶ÀÁ¢µÄHtml Ò³Ãæ¡£ÕâÀïËù½²µÄ¿ò¼Ü±à³Ì°üÀ¨¿ò¼ÜµÄ×ÔÎÒ¿ØÖÆÒÔ¼°¿ò¼ÜÖ®¼äµÄ»¥Ïà·ÃÎÊ£¬
ÀýÈç´ÓÒ»¸ö¿ò¼ÜÖÐÒýÓÃÁíÒ»¸ö¿ò¼ÜÖеÄJavaScript±äÁ¿¡¢µ÷ÓÃÆäËû¿ò¼ÜÄڵĺ¯Êý¡¢¿ØÖÆÁíÒ»
¸ö¿ò¼ÜÖÐ±íµ¥µÄÐÐΪµÈ¡£
2 ¿ò¼Ü¼äµÄ»¥ÏàÒýÓÃ
Ò»¸öÒ³ÃæÖеÄËùÓпò¼ÜÒÔ¼¯ºÏµÄÐÎʽ×÷Ϊwindow ¶ÔÏóµÄÊôÐÔÌṩ£¬ÀýÈ磺
window.frames ¾Í±íʾ¸ÃÒ³ÃæÄÚËùÓпò¼ÜµÄ¼¯ºÏ£¬ÕâºÍ±íµ¥¶ÔÏó¡¢Á´½Ó¶ÔÏó¡¢Í¼Æ¬¶ÔÏóµÈÊÇ
ÀàËƵģ¬²»Í¬µÄÊÇ£¬ÕâЩ¼¯ºÏÊÇdocument µÄÊôÐÔ¡£Òò´Ë£¬ÒªÒýÓÃÒ»¸ö×Ó¿ò¼Ü£¬¿ÉÒÔʹÓÃÈç
ÏÂÓï·¨£º
Javascript ´úÂë
window.frames[“frameName”];
window.frames.frameName
window.frames[index]
ÆäÖУ¬window×ÖÑùÒ²¿ÉÒÔÓÃself´úÌæ»òÊ¡ÂÔ£¬¼ÙÉèframeName ΪҳÃæÖеÚÒ»¸ö¿ò¼Ü£¬
ÔòÒÔϵÄд·¨Êǵȼ۵ģº
JavaScript ´úÂë
self.frames[“frameName”]
self.frames[0]
frames[0]
frameName
Á˽âÁËÈçºÎÒýÓÃÒ»¸ö¿ò¼Ü£¬ÄÇôÒýÓõÄÕâ¸ö¿ò¼Üµ½µ×ÊÇʲôÄØ£¿Æäʵ£¬Ã¿¸ö¿ò¼Ü¶¼¶ÔÓ¦
Ò»¸öHTML Ò³Ã棬ËùÒÔÕâ¸ö¿ò¼ÜÒ²ÊÇÒ»¸ö¶ÀÁ¢µÄä¯ÀÀÆ÷´°¿Ú£¬Ëü¾ßÓд°¿ÚµÄËùÓÐÐÔÖÊ£¬Ëù
ν¶Ô¿ò¼ÜµÄÒýÓÃÒ²¾ÍÊǶÔwindow ¶ÔÏóµÄÒýÓá£ÓÐÁËÕâ¸öwindow ¶ÔÏ󣬾ͿÉÒԺܷ½±ãµØ¶Ô
ÆäÖеÄÒ³Ãæ½øÐвÙ×÷£¬ÀýÈçʹÓÃwindow.document¶ÔÏóÏòÒ³ÃæдÈëÊý¾Ý¡¢Ê¹ÓÃwindow.location
ÊôÐÔÀ´¸Ä±ä¿ò¼ÜÄÚµÄÒ³ÃæµÈ¡£
ÏÂÃæ·Ö±ð½éÉܲ»Í¬²ã´Î¿ò¼Ü¼äµÄ»¥ÏàÒýÓãº
2.1£®¸¸¿ò¼Üµ½×Ó¿ò¼ÜµÄÒýÓÃ
ÖªµÀÁËÉÏÊöÔÀí£¬´Ó¸¸¿ò¼ÜÒýÓÃ×Ó¿ò¼Ü±äµÄ·Ç³£ÈÝÒ×£¬¼´£º
Java ´úÂë
1. window.frames[“frameName”];
ÕâÑù¾ÍÒýÓÃÁËÒ³ÃæÄÚÃûΪframeName µÄ×Ó¿ò¼Ü¡£Èç¹ûÒªÒýÓÃ×Ó¿ò¼ÜÄÚµÄ×Ó¿ò¼Ü£¬¸ù¾Ý
ÒýÓõĿò¼Üʵ¼Ê¾ÍÊÇwindow¶ÔÏóµÄÐÔÖÊ£¬¿ÉÒÔÕâÑùʵÏÖ£º
JavaScript ´úÂë
window.frames[“frameName”].frames[“frameName2”];
window.frames[“frameName”].frames[“frameName2”];
ÕâÑù¾ÍºÜÒýÓõ½Á˶þ¼¶×Ó
Ïà¹ØÎĵµ£º
¡¡¡¡ÀûÓÃCookie£ºCookieÊÇä¯ÀÀÆ÷´æ´¢ÉÙÁ¿ÃüÃûÊý¾Ý.ËüÓëij¸öÌض¨µÄÍøÒ³»òÍøÕ¾¹ØÁªÔÚÒ»Æð¡£
¡¡¡¡CookieÓÃÀ´¸øä¯ÀÀÆ÷ÌṩÄÚ´æ,ÒÔ±ã½Å±¾ºÍ·þÎñÆ÷³ÌÐò¿ÉÒÔÔÚÒ»¸öÒ³ÃæÖÐʹÓÃÁíÒ»¸öÒ³ÃæµÄÊäÈëÊý¾Ý¡£
¡¡¡¡Post.htm
ÒÔÏÂÊÇÒýÓÃƬ¶Î£º
<input type="text" name="txt1">
<input type="button" value="Post">
<s ......
Build your web applications quickly and easily using the industry leading web application IDE -- Aptana Studio.
Introduction:
Aptana Studio is a complete web development environment that combines powerful authoring tools for HTML, CSS, and JavaScript, along with thousands of additional plugins ......
function $id(s) {
return document.getElementById(s);
}
//ÅжÏСÊý
function IsFloat(s) {
if (!/^[+\-]?\d+(.\d+)?$/.test(s))
return false;
else
return ......
¼¸ºõËùÓеĸ» Web Ó¦Óö¼»ùÓÚÒ»¸ö»ò¶à¸ö Web UI ¿â»ò¿ò¼Ü£¬ÕâЩ UI ¿âÓë¿ò¼Ü¼«´óµØ¼ò»¯ÁË¿ª·¢½ø³Ì£¬²¢´øÀ´Ò»Ö£¬¿É¿¿£¬ÒÔ¼°¸ß¶È½»»¥ÐÔµÄÓû§½çÃæ¡£±¾ÎĽéÉÜÁË 15 ¸ö·Ç³£Ç¿´óµÄ JavaScript Web UI ¿â£¬·Ç³£Êʺϸ÷ÖÖ¸÷ÖÖ¹æÄ£µÄ¸» Web Ó¦ÓõĿª·¢¡£
LivePipe
LivePipe UI »ùÓÚ Prototype Javascript ¿ò¼Ü£¬°üº¬Á ......
Ҫȡʲôֵ£¿
È¡value£ºgetElementById("STB_433").value;
ȡ״̬£¨ÊÇ·ñcheck£©£ºgetElementById("STB_433").checked
È¡ID:getElementById("STB_433").id
...
var checkboxs=document.getElementsByTagName("input");
var i;
for(i=0;i<checkboxs.length;i++)
{
if(checkboxs[i].type=='checkbox')
{ ......