常用JS函数
来源:互联网 发布:网络口碑营销概念 编辑:程序博客网 时间:2024/06/08 04:31
String.prototype.trim = function()
{
return this.replace(/(^/s+)|/s+$/g,"");
}
//弹出对话框(自动关闭)
function autoCloseAlert(msg)
{
try
{
var tempFrm=document.getElementById("msgFrm");
if(tempFrm==null||typeof(tempFrm)=="undefined")
{
tempFrm =document.createElement("iframe");
document.body.appendChild(tempFrm);
tempFrm.id = "msgFrm";
tempFrm.name ="msgFrm";
tempFrm.style.display="none";
}
msg=msg.replace(/"/g,"///"");
msg=msg.replace(//n/g,"//n");
var sfeature="status:no;resizable:no;help:no;dialogHeight:height:30px;dialogHeight:40px;";
msgFrm.showModelessDialog("javascript:alert(/""+msg+"/");window.close();","",sfeature);
setTimeout("msgFrm.location.reload();",1000);
}catch(e)
{
alert(msg);
}
}
//暂停函数
function pause(numberMillis)
{
var dialogScript = 'window.setTimeout(' +' function () { window.close(); }, ' + numberMillis + ');';
var result = window.showModalDialog('javascript:document.writeln(' + '"<script>' + dialogScript + '<' + '/script>")');
}
//使滚动条滚动到最底部(div)
<div
style="width:100%;height:210;top:0px;left:0px;overflow-y:auto;overflow-x:auto;border: black 1px solid;"
name="contentTb" id="contentTb" oncontextmenu="showoff();">
<table name="listTable" width="100%" id="listTable" align="left" border=0 cellspacing="0" cellpadding="0" class='listTable'>
<tr class="head_tr">
<td class='head_Td' style='width:15px;align:center'><input type="checkbox" onclick="javasrcipt:checkAllObj(this);"></td>
<td class='head_Td' nowrap><font size='2'>编收</font></td>
<td class='head_Td' width="6%"><font size='2'>编号</font></td>
<td class='head_Td' nowrap><font size='2'>文号</font></td>
<td class='head_Td' nowrap><font size='2'> 文档标题 </font></td>
<td class='head_Td' nowrap width='6%'><font size='2'>份数</font></td>
<td class='head_Td' nowrap><font size='2'> 信封号 </font></td>
<td class='head_Td' nowrap><font size='2'> 发文单位 </font></td>
<td class='head_Td' width="8%"><font size='2'>制文日期</font></td>
<td class='head_Td' nowrap width='7%'><font size='2'>密级</font></td>
</tr>
</table>
</div>
var divContent=document.getElementById("contentTb");
divContent.scrollTop=divContent.scrollHeight;
- 常用js函数CheckData.js
- 常用js函数Common.js
- 常用JS函数
- 常用JS函数
- 常用的JS函数
- [转载]常用JS函数
- JS常用函数
- 常用js函数
- 常用js函数
- 常用js函数
- js常用自定义函数
- js常用函数
- js常用验证函数
- 常用的JS函数
- 常用js(javascript)函数
- js常用函数
- js常用函数
- 常用JS函数
- AJAX应用篇:必须用到和不必使用的地方
- ACE与ASIO之间关于Socket编程的比较
- JavaScript高级教程- 第四课
- 五条javascript技巧帮助你提高代码质量
- JavaScript高级教程- 第五课
- 常用JS函数
- 将把普通文件夹改成受保护的操作系统文件
- SQL2005
- zip文件上传linux主机,解压后权限异常,用虚拟机解决文件权限问题
- javascript 右键菜单
- C++/CLI中的资源清理(Destructor,Finalizer)
- Ajax 页面无刷新技术学习(GET)
- Oracle DBA最常碰到的10个Oracle错误
- 在IE中显示pdf文档的方法及参数设置