ʹÓÃjavascript´ò¿ªÄ£Ì¬¶Ô»°¿ò
1. ±ê×¼µÄ·½·¨
<mce:script type="text/javascript"><!--
function openWin(src, width, height, showScroll){
window.showModalDialog (src,"","location:No;status:No;help:No;dialogWidth:"+width+";dialogHeight:"+height+";scroll:"+showScroll+";");
}
// --></mce:script>
Àý£º<span style="CURSOR: pointer" onclick="openWin
(’http://www.deepteach.com’, ’500px’, ’400px’, ’no’)">µã»÷</span>
2. ҪעÒâµÄÊÇ£¬Firefox²¢²»Ö§³Ö¸Ã¹¦ÄÜ£¬ËüÖ§³ÖµÄÓï·¨ÊÇ
window.open
(’openwin.html’,'newWin’, 'modal=yes, width=200,height=200,resizable=no, scrollbars=no’ );
3. ÈçºÎ×Ô¶¯ÅжÏä¯ÀÀÆ÷
<input type="button" value="´ò¿ª¶Ô»°¿ò" onclick="showDialog('#')"/>
<SCRIPT LANGUAGE="JavaScript">
<!--
function showDialog(url)
{
if( document.all ) //IE
{
feature="dialogWidth:300px;dialogHeight:200px;status:no;help:no";
window.showModalDialog(url,null,feature);
}
else
{
//modelessDialog¿ÉÒÔ½«modal»»³Édialog=yes
feature ="width=300,height=200,menubar=no,toolbar=no,location=no,";
feature+="scrollbars=no,status=no,modal=yes";
window.open(url,null,feature);
}
}
//-->
</SCRIPT>
4. ÈçºÎÔÚÒ³ÃæÖ®¼ä´«µÝÊýÖµ
(Ò»)showModalDialogʹÓÃÀý×Ó,¸¸´°¿ÚÏò×Ó´°¿Ú´«µÝÖµ,×Ó´°¿ÚÉèÖø¸´°¿ÚµÄÖµ,×Ó´°¿Ú¹Ø±ÕµÄʱºò·µ»ØÖµµ½¸¸´°¿Ú.
farther.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>New Document </TITLE>
<META content="EditPlus" name="Generator">
<META content="" name="Author">
<META content="" name="Keywords">
<META content="" name="Description">
<mce:script language="javascript"><!--
function openChild(){
var k = window.showModalDialog("child.html",window,"dialogWidth:335px;status:no;dialogHeight:300px");
if(k
Ïà¹ØÎĵµ£º
HTMLÎļþ£º
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>js²Ù×÷XmlÔöɾ¸Ä²é(IEÏÂ)</title>
<script type="text/jav ......
[ÐÂÎÅ×ÊѶ] ¿ÉÒÔ°ÑjavaScriptǶÈëµ½swfÀïÁË
×ÊѶÀàÐÍ: ·Òë
À´Ô´Ò³Ãæ: http://www.kennybunch.com/blog/2009/09/embedding-javascript-into-a-swf/
×ÊѶԱêÌâ: Embedding JavaScript into a SWF
×ÊѶÔ×÷Õß: Kenny Bunch
flex ¿ª·¢ÕßÓ¦¸Ã¶ÔʹÓÃEmbedÔªÊý¾Ý±êǩǶÈë¸÷ÖÖ×ÊÔ´¶¼ºÜÊìϤÁË£¬ÏÖÔÚÔÚflash cs4ÖÐͬÑù¿ÉÒ ......
ÄÚ²¿Êý×é
ÔÚJavaÖÐΪÁË·½±ãÄÚ²¿¶ÔÏóµÄ²Ù×÷,¿ÉÒÔʹÓô°Ìå(Forms)¡¢¿ò¼Ü(Frames)¡¢ÔªËØ(element)¡¢Á´½Ó(links)ºÍê(Anchors)Êý×éʵÏÖ¶ÔÏóµÄ·ÃÎÊ¡£
¡¡anchors[]:ʹÓá¶A name=“anchorName“¡·±êʶÀ´½¨Á¢ÃªµÄÁ´½Ó¡£
¡¡links[]: ʹÓÃ<A href=”URL”>À´¶¨ÒåÒ»¸öÔ½Îı¾Á´½ÓÏî¡£
¡¡Forms[]: ÔÚ³ÌÐò ......
¹ØÓÚThis
1. ËüÊÇÒ»¸ö¹Ø¼ü×Ö£¬²¢²»ÊDZäÁ¿Ãû»òÊôÐÔÃû¡£
2. Ëüʵ¼ÊÖ¸functionËù¹ØÁªµÄ¶ÔÏó£¬Èç¹ûfunctionûÓйØÁªÈκζÔÏó£¬ÔòthisÊÇGlobal¶ÔÏó
var msg = 'I am global';
function showMsg(){
alert(this.msg);
};
function nestedShowMsg (){
var nested = function(){
alert(this.msg);
};
nested();
......
//¶¨ÒåÒª´ò¿ªµÄ¶Ô»°¿òÒ³ÃæµÄµØÖ· Ò»°ãÓÃactionÌøתҪдÃ÷actionµÄµØÖ·£¬Èç¹ûÐèÒª²ÎÊý£¬ÔòÔÚºóÃæÆ´½Ó
var urlDialog = "grpBlackWhiteManageAction.do?act=choiceMessageModel&GrpBWhiteListLevel=0";
//¶¨ÒåÒªµ¯³öµÄ¶Ô»°¿òµÄģʽ£¬dialogWidth¿í£¬dialogHeight¸ß µÈµÈ
var style = "dialogWidth=600px;dialogH ......