iframe 中运行父页面的函数--->
一句很有用的话:
window.parent.closeIframe(); //closeIframe() 父页面JS函数名
IE下图片刷新--->
<img src='http://bbs.blueidea.com/images/blue/reply.gif' align='absmiddle' border='0' alt= "看不清楚?请点击刷新" style="cursor : pointer;" οnclick="this.src='http://bbs.blueidea.com/images/blue/reply.gif?' + Math.random()">
jQuery Validate的使用
好的页面网站:
文字换行:
style="WORD-WRAP: break-word;word-break:break-all;"
style="white-space:normal;WORD-WRAP: break-word;word-break:break-all;overflow:auto;“
//处理iframe的自适应高度
function dyniframesize(down)
{
var pTar = null;
if (document.getElementById)
{
pTar = document.getElementById(down);
}
else
{
eval('pTar = ' + down + ';');
}
if (pTar && !window.opera)
{
//begin resizing iframe
pTar.style.display="block"
if (pTar.contentDocument && pTar.contentDocument.body.offsetHeight)
{
//ns6 syntax
pTar.height = pTar.contentDocument.body.offsetHeight +20;
pTar.width = pTar.contentDocument.body.scrollWidth+20;
}
else if (pTar.Document && pTar.Document.body.scrollHeight)
{
//ie5+ syntax
pTar.height = pTar.Document.body.scrollHeight;
pTar.width = pTar.Document.body.scrollWidth;
}
}
}
function dyniframesize(down)
{
var pTar = null;
if (document.getElementById)
{
pTar = document.getElementById(down);
}
else
{
eval('pTar = ' + down + ';');
}
if (pTar && !window.opera)
{
//begin resizing iframe
pTar.style.display="block"
if (pTar.contentDocument && pTar.contentDocument.body.offsetHeight)
{
//ns6 syntax
pTar.height = pTar.contentDocument.body.offsetHeight +20;
pTar.width = pTar.contentDocument.body.scrollWidth+20;
}
else if (pTar.Document && pTar.Document.body.scrollHeight)
{
//ie5+ syntax
pTar.height = pTar.Document.body.scrollHeight;
pTar.width = pTar.Document.body.scrollWidth;
}
}
}