test.htm:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title> JK:支持民族工业,尽量少买X货 </title>
<script language=javascript srcccccc="CommonJSFunction.js">
/**
* This function is to submit a form to ModalDialog.
* JK 2007-03-06
*/
function submitToModalDialog(formObj,dialogTitle,sFeatures){
var dialogArguments=new Array();
dialogArguments["src"]=null;
dialogArguments["title"]=dialogTitle;
dialogArguments["form"]=formObj;
return showModalDialog("DialogFrame.htm",dialogArguments,sFeatures);
}
</script>
</head>
<body>
<form name="frm0" action="test.htm" >
<input type=button value=DialogFrame onclick="var a=new
Array();a['src']='test.htm';window.showModalDialog('DialogFrame.htm',a);"/> <br/>
<input name=q> <input type=button value=DialogFrame onclick="submitToModalDialog(this.form,'JK','');"/> <br/>
<a href="http://jkisjk.spaces.live.com">http://jkisjk.spaces.live.com</a> <br/>
</form>
<hr/>
</body>
</html>
----------------------------
DialogFrame.htm
本页面解决的问题
1。IE设置检查更新为"自动"时dialog里的信息是旧数据
2。dialog里location.href=url导致新开窗口 (另外一个解决办法是dialog里的所有页面加<base target="_self"/>)
3。支持submitToModalDialog
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language=javascript>
var DialogArgument=window.dialogArguments;
//The following code exists for :IE 6 can not change dialog title.
if (DialogArgument && DialogArgument.title) document.write(" <title>"+DialogArgument.title+" </title>");
else document.write(" <title> Dialog </title>");
</script>
</head>
<body leftMargin=0 rightMargin=0 topMargin=0 bottomMargin=0 onload="initFun();" scroll=no>
<iframe name="dialogFrame" src="blank.html" width=100% height=100% id=dialogIframe> </iframe>
<form name="dialogForm" method="post" action="" target="dialogFrame" style="display:onne;">
</form>
</body>
</html>
<script language=javascript>
function initFun()
{
if (DialogArgument!=null){
if(DialogArgument.form!=null){
var argForm=DialogArgument.form;
var tempForm=document.dialogForm;
tempForm.action=argForm.action;
var argFormElements=argForm.elements;
for(var i=0;i <argFormElements.length;i++){
tempForm.insertAdjacentHTML("beforeEnd",argFormElements[i].outerHTML);
}
tempForm.submit();
}
else{
document.dialogForm.action=DialogArgument.src;
document.dialogForm.submit();
}
}
else alert("useDialogFrameWrongly");
}
</script>
没有合适的资源?快使用搜索试试~ 我知道了~
javascript学习源码
共148个文件
htm:92个
gif:34个
js:12个
需积分: 3 2 下载量 61 浏览量
2008-11-19
14:35:53
上传
评论
收藏 185KB RAR 举报
温馨提示
javascript版主jk提供的源码2
资源详情
资源评论
资源推荐
收起资源包目录
javascript学习源码 (148个子文件)
Base.css 1KB
Thumbs.db 14KB
20060925132517e9cb7.gif 36KB
file.gif 942B
waitInYahooMail.gif 468B
backcolor.gif 365B
JKCalendar.gif 179B
root.gif 173B
removeformat.gif 171B
folder.gif 170B
commonClosedFolder.gif 166B
M1.gif 163B
lastClosedFolder.gif 163B
commonOpenFolder.gif 163B
lastOpenFolder.gif 159B
blank.gif 156B
fontcolor.gif 142B
image.gif 102B
attachment.gif 93B
blist.gif 89B
nlist.gif 89B
link.gif 86B
underline.gif 81B
bold.gif 79B
commonFile.gif 73B
aright.gif 73B
aleft.gif 73B
center.gif 72B
italicize.gif 71B
thread1.gif 69B
lastFile.gif 68B
up.gif 62B
down.gif 62B
down.gif 62B
seperator.gif 60B
blank.gif 58B
固定首行-改变列宽.htm 85KB
RowSortSample.htm 61KB
数字转中文大写.htm 45KB
为什么有时没有autocomplete.htm 38KB
JKCombox.htm 27KB
JKValidationDemo.htm 15KB
模态窗口window.open意外.htm 14KB
如何使处在父级滤镜中的层的滤镜失效.htm 14KB
打开一个新窗口前检查窗口是否存在.htm 13KB
JKTree.htm 8KB
JKDrag.htm 8KB
JKTreeSimpleDragableTree.htm 7KB
ListPageExample.htm 6KB
ChouJiangSample.htm 6KB
JKTreePerformanceTest.htm 5KB
MoveRightOrLeft.htm 5KB
JKCalendar.htm 5KB
Point24-JK.htm 5KB
JKCalendar_zh_CN.htm 5KB
RowAddAndDelete.htm 5KB
JKValidationDemo-PerformanceTest.htm 4KB
SelectAndSubSelect.htm 4KB
MainIframe(TopLeftRight).htm 4KB
JKDragGame1.htm 4KB
JKDragRowColumn.htm 4KB
JKDragRowColumn_2.htm 4KB
JKValidationDemo-SoftAlertWhenBlur.htm 3KB
TopMenu.htm 3KB
ChangeColumnWidth-New.htm 3KB
LeftMenu.htm 3KB
JKTreeSimpleTree.htm 3KB
JKEditor.htm 3KB
FixFirstRowAndColumn.htm 3KB
JKTreeMultipleTree.htm 3KB
SimpleDrag.htm 3KB
YearMonthDaySelect.htm 2KB
JK选色板20080125.htm 2KB
DivFixedInBody2.htm 2KB
ChangeColumnWidth.htm 2KB
FixFirstRow.htm 2KB
LongValueButton.htm 2KB
DivFixedInBody1.htm 2KB
MainIframe(LeftRight).htm 2KB
ShiftForCheckbox.htm 2KB
DifferentColorInTextarea.htm 2KB
MouseOverAndMouseOut.htm 2KB
TrHeighLight.htm 2KB
MoveScroll.htm 1KB
DisableBody.htm 1KB
ChangeTdStyleWhenMouseOver.htm 1KB
DialogFrame.htm 1KB
CloseAlertBox.htm 1KB
JKTreeDefaultTree.htm 1KB
FormInForm.htm 1KB
字符串转日期.htm 1KB
不用initialize模式实现js的继承.htm 1KB
Select按键后定位到option.htm 1KB
Notice.htm 1KB
test.htm 1KB
MoveScroll2.htm 1KB
DivBeforeSelect.htm 1KB
Xipaisuanfa.htm 1024B
IE6下对象操作的Bug.htm 1022B
Index.htm 974B
共 148 条
- 1
- 2
xiaolei1982
- 粉丝: 198
- 资源: 17
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0