??xml version="1.0" encoding="utf-8" standalone="yes"?>全部免费毛片在线播放网站,中文在线播放一区二区,欧美hdxxxxxhttp://www.aygfsteel.com/pitey/category/37535.htmlzh-cnWed, 11 Feb 2009 04:05:43 GMTWed, 11 Feb 2009 04:05:43 GMT60- ?重写window.setTimeout传参?支持传对?的方?/title>http://www.aygfsteel.com/pitey/archive/2008/03/18/186930.htmlPiteyPiteyTue, 18 Mar 2008 02:21:00 GMThttp://www.aygfsteel.com/pitey/archive/2008/03/18/186930.htmlhttp://www.aygfsteel.com/pitey/comments/186930.htmlhttp://www.aygfsteel.com/pitey/archive/2008/03/18/186930.html#Feedback1http://www.aygfsteel.com/pitey/comments/commentRss/186930.htmlhttp://www.aygfsteel.com/pitey/services/trackbacks/186930.html也许你过dsetTimeout中传参数一直是q样
setTimeout("pass(" + argu + ")",1000)
q样只能传字W串,对传递object无能ؓ力了,需要大Ҏ?然而别忘了,W一个参数还可以是function!!!
看以下代码实现向里面的function 传参?/font>
<script type="text/javascript">
var _st = window.setTimeout;window.setTimeout = function(fRef, mDelay) {
if(typeof fRef == 'function'){
var argu = Array.prototype.slice.call(arguments,2);
var f = (function(){ fRef.apply(null, argu); });
return _st(f, mDelay); }
return _st(fRef,mDelay);}
function test(x){ alert(x);}
window.setTimeout(test,1000,'fason');
</script>
怎样?是不是很方便?代码其实很?重蝲了一下window.setTimeout,用applyd调前面的function.
q没有用qapply,call的可以去查资?发现版本不够的看我低版本的实现方?a target="_blank">http://blog.csdn.net/fason/archive/2004/07/30/apply_call.aspx
另外需要知道的?NS环境?后面的参数确实是来传l前面的函数?IE?没有实现~~~~~~~~~~~~~

]]>- 转document.execCommand()用法说明http://www.aygfsteel.com/pitey/archive/2008/03/17/186862.htmlPiteyPiteyMon, 17 Mar 2008 13:18:00 GMThttp://www.aygfsteel.com/pitey/archive/2008/03/17/186862.htmlhttp://www.aygfsteel.com/pitey/comments/186862.htmlhttp://www.aygfsteel.com/pitey/archive/2008/03/17/186862.html#Feedback0http://www.aygfsteel.com/pitey/comments/commentRss/186862.htmlhttp://www.aygfsteel.com/pitey/services/trackbacks/186862.htmldocument.execCommand()用法说明
2D-Position 允许通过拖曳Udl对定位的对象?br />
AbsolutePosition 讑֮元素?#160;position 属性ؓ“absolute”(l对)?br />
BackColor 讄或获取当前选中区的背景颜色?br />
BlockDirLTR 目前未支持?br />
BlockDirRTL 目前未支持?br />
Bold 切换当前选中区的_体昄与否?br />
BrowseMode 目前未支持?br />
Copy 当前选中区复制到剪脓ѝ?br />
CreateBookmark 创徏一个书{N或获取当前选中区或插入点的书签锚的名称?br />
CreateLink 在当前选中Z插入链接Q或昄一个对话框允许用户指定要ؓ当前选中区插入的链接?#160;URL?br />
Cut 当前选中区复制到剪脓板ƈ删除之?br />
Delete 删除当前选中区?br />
DirLTR 目前未支持?br />
DirRTL 目前未支持?br />
EditMode 目前未支持?br />
FontName 讄或获取当前选中区的字体?br />
FontSize 讄或获取当前选中区的字体大小?br />
ForeColor 讄或获取当前选中区的前景(文本)颜色?br />
FormatBlock 讄当前块格式化标签?br />
Indent 增加选中文本的羃q?br />
InlineDirLTR 目前未支持?br />
InlineDirRTL 目前未支持?br />
InsertButton 用按钮控件覆盖当前选中区?br />
InsertFieldset 用方框覆盖当前选中区?br />
InsertHorizontalRule 用水q线覆盖当前选中区?br />
InsertIFrame 用内嵌框架覆盖当前选中区?br />
InsertImage 用图像覆盖当前选中区?br />
InsertInputButton 用按钮控件覆盖当前选中区?br />
InsertInputCheckbox 用复选框控g覆盖当前选中区?br />
InsertInputFileUpload 用文件上载控件覆盖当前选中区?br />
InsertInputHidden 插入隐藏控g覆盖当前选中区?br />
InsertInputImage 用图像控件覆盖当前选中区?br />
InsertInputPassword 用密码控件覆盖当前选中区?br />
InsertInputRadio 用单选钮控g覆盖当前选中区?br />
InsertInputReset 用重|控件覆盖当前选中区?br />
InsertInputSubmit 用提交控件覆盖当前选中区?br />
InsertInputText 用文本控件覆盖当前选中区?br />
InsertMarquee 用空字幕覆盖当前选中区?br />
InsertOrderedList 切换当前选中区是~号列表q是常规格式化块?br />
InsertParagraph 用换行覆盖当前选中区?br />
InsertSelectDropdown 用下拉框控g覆盖当前选中区?br />
InsertSelectListbox 用列表框控g覆盖当前选中区?br />
InsertTextArea 用多行文本输入控件覆盖当前选中区?br />
InsertUnorderedList 切换当前选中区是目W号列表q是常规格式化块?br />
Italic 切换当前选中区斜体显CZ否?br />
JustifyCenter 当前选中区在所在格式化块置中?br />
JustifyFull 目前未支持?br />
JustifyLeft 当前选中区所在格式化块左寚w?br />
JustifyNone 目前未支持?br />
JustifyRight 当前选中区所在格式化块右寚w?br />
LiveResize q MSHTML ~辑器在~放或移动过E中持箋更新元素外观Q而不是只在移动或~放完成后更新?br />
MultipleSelection 允许当用h?#160;Shift ?#160;Ctrl 键时一ơ选中多于一个站点可选元素?br />
Open 打开?br />
Outdent 减少选中区所在格式化块的~进?br />
OverWrite 切换文本状态的插入和覆盖?br />
Paste 用剪贴板内容覆盖当前选中区?br />
PlayImage 目前未支持?br />
Print 打开打印对话框以便用户可以打印当前页?br />
Redo 重做?br />
Refresh h当前文?br />
RemoveFormat 从当前选中Z删除格式化标{?br />
RemoveParaFormat 目前未支持?br />
SaveAs 当?#160;Web 面保存为文件?br />
SelectAll 选中整个文?br />
SizeToControl 目前未支持?br />
SizeToControlHeight 目前未支持?br />
SizeToControlWidth 目前未支持?br />
Stop 停止?br />
StopImage 目前未支持?br />
StrikeThrough 目前未支持?br />
Subscript 目前未支持?br />
Superscript 目前未支持?br />
UnBookmark 从当前选中Z删除全部书签?br />
Underline 切换当前选中区的下划U显CZ否?br />
Undo 撤消?br />
Unlink 从当前选中Z删除全部链接?br />
Unselect 清除当前选中区的选中状态?br />
<HTML>
<HEAD>
<TITLE>JavaScript--execCommand指o?/span></TITLE>
<SCRIPT LANGUAGE="javascript">
<!--
/*
*该function执行copy指o
*/
function fn_doufucopy(){
edit.select();
document.execCommand('Copy');
}
/*
*该function执行paste指o
*/
function fn_doufupaste() {
tt.focus();
document.execCommand('paste');
}
/*
*该function用来创徏一个超链接
*/
function fn_creatlink()
{
document.execCommand('CreateLink',true,'true');//弹出一个对话框输入URL
//document.execCommand('CreateLink',false,'http://www.51js.com');
}
/*
*该function用来选中的区块设为指定的背景?br />
*/
function fn_change_backcolor()
{
document.execCommand('BackColor',true,'#FFbbDD');//true或false都可?/span>
}
/*
*该function用来选中的区块设为指定的前景?改变选中区块的字体大?改变字体,字体变粗变斜
*/
function fn_change_forecolor()
{
//指定前景?/span>
document.execCommand('ForeColor',false,'#BBDDCC');//true或false都可?br />
//指定背景?/span>
document.execCommand('FontSize',false,7); //true或false都可?br />
//字体必须是系l支持的字体
document.execCommand('FontName',false,'标楷?/span>'); //true或false都可?br />
//字体变粗
document.execCommand('Bold');
//变斜?/span>
document.execCommand('Italic');
}
/*
*该function用来选中的区块加上不同的U条
*/
function fn_change_selection()
{
//选中的文字加下划U?/span>
document.execCommand('Underline');
//在选中的文字上划粗U?/span>
document.execCommand('StrikeThrough');
//选中的部分文字变l?/span>
document.execCommand('SuperScript');
//选中区块的下划线取消?/span>
document.execCommand('Underline');
}
/*
*该function用来选中的区块排成不同的格式
*/
function fn_format()
{
//有序列排?/span>
document.execCommand('InsertOrderedList');
//实心无序列排?/span>
document.execCommand('InsertUnorderedList');
//I心无序列排?/span>
document.execCommand('Indent');
}
/*
*该function用来选中的区块剪下或是删除掉
*/
function fn_CutOrDel()
{
//删除选中的区?br />
//document.execCommand('Delete');
//剪下选中的区?/span>
document.execCommand('Cut');
}
/*
*该function用来选中的区块重设ؓ一个相应的物g
*/
function fn_InsObj()
{
/*
******************************************
* 以下指o都是为选中的区块重设一个object;
* 如没有特D说?W二个参数true或false是一L;
* 参数三表CZؓ该object的id;
* 可以用在javascript中通过其指定的id来控制它
******************************************
*/
/*重设Z个button(InsertButton和InsertInputButtong一?
只不前者是button,后者是input)*/
/*document.execCommand('InsertButton',false,"aa"); //true或false无效
document.all.aa.value="风舞九天";*/
//重设Z个fieldset
/*document.execCommand('InsertFieldSet',true,"aa");
document.all.aa.innerText="刀剑如?;*/
//插入一个水q线
//document.execCommand('InsertHorizontalRule',true,"aa");
//插入一个iframe
//document.execCommand('InsertIFrame',true,"aa");
//插入一个InsertImage,设ؓtrue旉要图?false时不需囄
//document.execCommand('InsertImage',false,"aa");
//插入一个checkbox
//document.execCommand('InsertInputCheckbox',true,"aa");
//插入一个filecd的object
//document.execCommand('InsertInputFileUpload',false,"aa");
//插入一个hidden
/*document.execCommand('InsertInputHidden',false,"aa");
alert(document.all.aa.id);*/
//插入一个InputImage
/*document.execCommand('InsertInputImage',false,"aa");
document.all.aa.src="F-a10.gif";*/
//插入一个Password
//document.execCommand('InsertInputPassword',true,"aa");
//插入一个Radio
//document.execCommand('InsertInputRadio',false,"aa");
//插入一个Reset
//document.execCommand('InsertInputReset',true,"aa");
//插入一个Submit
//document.execCommand('InsertInputSubmit',false,"aa");
//插入一个input text
//document.execCommand('InsertInputText',false,"aa");
//插入一个textarea
//document.execCommand('InsertTextArea',true,"aa");
//插入一?#160;select list box
//document.execCommand('InsertSelectListbox',false,"aa");
//插入一个single select
document.execCommand('InsertSelectDropdown',true,"aa");
//插入一个line break(回??)
//document.execCommand('InsertParagraph');
//插入一个marquee
/*document.execCommand('InsertMarquee',true,"aa");
document.all.aa.innerText="bbbbb";*/
//用于取消选中的阴影部?br />
//document.execCommand('Unselect');
//选中面上的所有元?br />
//document.execCommand('SelectAll');
}
/*
*该function用来页面保存ؓ一个文?br />
*/
function fn_save()
{
//W二个参CؓƲ保存的文g?/span>
document.execCommand('SaveAs','mycodes.txt');
//打印整个面
//document.execCommand('print');
}
-->
</SCRIPT>
</HEAD>
<body>
<input id="edit" value="范例" NAME="edit"><br>
<button onclick="fn_doufucopy()" ID="Button1">Copy</button> <button onclick="fn_doufupaste()" ID="Button2">
paste</button><br>
<textarea id="tt" rows="10" cols="50" NAME="tt"></textarea>
<hr>
<br>
沉聚散变化又再,但是d卷土重来.<br>
天若有情天亦?人间正道是?<br>
都怪我,太执着,却也{不到花开叶落.<br>
<br>
Please select above letters, then click following buttons:<br>
<hr>
<input type="button" value="创徏CreateLink" onclick="fn_creatlink()" ID="Button3" NAME="Button3"><br>
<input type="button" value="改变文字背景?/span>" onclick="fn_change_backcolor()" ID="Button4" NAME="Button4"><br>
<input type="button" value="改变文字前景?/span>" onclick="fn_change_forecolor()" ID="Button5" NAME="Button5"><br>
<input type="button" value="l文字加U条" onclick="fn_change_selection()" ID="Button6" NAME="Button6"><br>
<input type="button" value="改变文字的排?/span>" onclick="fn_format()" ID="Button7" NAME="Button7"><br>
<input type="button" value="删除或剪下选中的部?/span>" onclick="fn_CutOrDel()" ID="Button8" NAME="Button8"><br>
<input type="button" value="插入Object" onclick="fn_InsObj()" ID="Button9" NAME="Button9"><br>
<input type="button" value="保存或打印文?/span>" onclick="fn_save()" ID="Button10" NAME="Button10"><br>
<input type="button" value="试Refresh属?/span>" onclick="document.execCommand('Refresh')" ID="Button11"
NAME="Button11">
</body>
</HTML>
普通的方式是激zM?/span><iframe>q入~辑状态,命o如下
IframeNamer.document.designMode="On"
字体--宋体、黑体、楷体等
execCommand("fontname","",字体)
字号--字号大小
execCommand("fontsize","",字号)
加重
execCommand("Bold")
斜体
execCommand("Italic")
下划U?br />
execCommand("Underline")
删除U?br />
execCommand("StrikeThrough")
上标
execCommand("SuperScript")
下标
execCommand("SubScript")
有序排列--数字序号
execCommand("InsertOrderedList")
无序排列--圆点序号
execCommand("InsertUnorderedList")
向前~进
execCommand("Outdent")
向后~进
execCommand("Indent")
居左
execCommand("JustifyLeft")
居右
execCommand("JustifyRight")
居中
execCommand("JustifyCenter")
剪切
execCommand("Cut")
拯
execCommand("Copy")
_脓
execCommand("Paste")
覆盖
execCommand("Overwrite")
取消操作--IE5.0以后可以无限取消
execCommand("Undo")
重复操作
execCommand("Redo")
讄链接--若按以下写法Q在IE5.0版本中会ȀzM个内建窗口,可以完成输入链接的功能,而且q可以选择MAILTO、FTP{各U链接类型,比较方便
execCommand("CreateLink")
在IE4.0中,没有内徏链接输入H口Q所以就需要用以下方式嵌入链接
execCommand("CreateLink","",TURL)
插入囄--׃IE中嵌入的可编控g是针Ҏ地资源的Q所以其默认的图片资源来自本圎ͼ所以基于WEB内容的编辑最好自己做输入框,然后用如下命令实现?br />
execCommand("InsertImage","",ImgURL)
字体颜色
execCommand("ForeColor","",CColor)

]]> - 获取 Iframe内的元素对象http://www.aygfsteel.com/pitey/archive/2008/03/09/184830.htmlPiteyPiteySun, 09 Mar 2008 05:48:00 GMThttp://www.aygfsteel.com/pitey/archive/2008/03/09/184830.htmlhttp://www.aygfsteel.com/pitey/comments/184830.htmlhttp://www.aygfsteel.com/pitey/archive/2008/03/09/184830.html#Feedback1http://www.aygfsteel.com/pitey/comments/commentRss/184830.htmlhttp://www.aygfsteel.com/pitey/services/trackbacks/184830.html
获得ifream的对象,q把ifreame中页?lt;div id="my">隐藏?br />
test1.html
<html>
<head>
<script>
function t(){
var dd = document.all('test2').contentWindow.document;
dd.getElementById('my').style.display='none';
}
</script>
</head>
<body >
<input type="button" value="test" onClick="t();"/>
<iframe id="test2" name="test2" src="test2.html"></iframe>
</body>
</html>
test2.html
<html>
<head>
</head>
<body>
<div id="my" name="my">
试一下,父窗体可以把我隐藏掉!!!!!!!!
</div>
</body>
</html>

]]> - 模式H体关闭后调用父cȝ体的Ҏhttp://www.aygfsteel.com/pitey/archive/2007/05/07/115728.htmlPiteyPiteyMon, 07 May 2007 09:04:00 GMThttp://www.aygfsteel.com/pitey/archive/2007/05/07/115728.htmlhttp://www.aygfsteel.com/pitey/comments/115728.htmlhttp://www.aygfsteel.com/pitey/archive/2007/05/07/115728.html#Feedback0http://www.aygfsteel.com/pitey/comments/commentRss/115728.htmlhttp://www.aygfsteel.com/pitey/services/trackbacks/115728.html
调用模式H体window.showModalDialog('/test.html',window) 记得W二个参C定要把父cȝ体当参数传到模式H体?br />
模式H体加入事g
<script for="window" event="onunload">
dialogArguments.window.test();
</script>
q样可以在模式H体关闭或者是重蝲的时候调用父cȝ体的ҎQ如果不惌重蝲的时候调用父H体的test()ҎQ可以给父窗体传一个变量,到时候根据变量的值来判断是不是要执行test()Ҏ?br />

]]>
վ֩ģ壺
|
|
|
|
|
|
|
|
˹|
̨|
|
|
˳|
̨|
ɽʡ|
|
|
Ϫ|
|
ͭɽ|
|
|
ݶ|
|
Ԫ|
ʡ|
|
ɽ|
|
书|
ֳ|
|
»|
ʡ|
|
ʯʨ|
ɾ|
|
|
Ҵ|
|