摘要:
var rdw = 文件路径+文件名; //为了避免转义反斜杠出问题,这里将对其进行转换 var re = /(\\+)/g; var filename = rdw.replace(re, "#"); //对路径字符串进行剪切截取 var one = filename.split("#"); //获取数组中最后一个,即文件名 var two=one[one.length-1]; //再对文件名进行截取,以取得后缀名 var three=two.split("."); //获取截取的最后一个字符串,即为后缀名 var last=thre 阅读全文
摘要:
第一种、页面上的//js接受页面的传值 例如?id=1var dd = window.location.search.substring(1,location.search.length); alert(dd); //id=1function GetQueryString(name) { var regex = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(regex); if(r!=null 阅读全文
摘要:
//获取用户复制到黏贴板中的文本内容 var content = window.clipboardData.getData("Text"); //js里面的粘贴事件onpastefunction pasteCheck() {var content = window.clipboardData.getData("Text"); //获取用户复制到黏贴板中的文本内容for (var i = 0; i < content.length; i++) {var codeAsc = content.charCodeAt(i); //获取文本内容字符串每位的AS 阅读全文
摘要:
//调整ie的大小function w() { window.moveTo(100,100); //此处必须是100 //window.resizeTo(width,height) window.resizeTo(500,400); }<body onload="w()"> 阅读全文
摘要:
网页可见区域宽:document.body.clientWidth 网页可见区域高:document.body.clientHeight 网页可见区域宽:document.body.offsetWidth (包括边线的宽) 网页可见区域高:document.body.offsetHeight (包括边线的宽) 网页正文全文宽:document.body.scrollWidth 网页正文全文高:document.body.scrollHeight 网页被卷去的高:document.body.scrollTop 网页被卷去的左:document.body.scrollLeft 网页正文部分上:wi 阅读全文
摘要:
将以下js语言放到起始页面的head中,然后运行,就做到了程序起始运行时最大化显示。<script type="text/javascript" language="JavaScript1.2"> <!-- // Auto maximize window script - By Nick Lowe (nicklowe@ukonline.co.uk) // Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/ window.moveTo(0,0); if (do 阅读全文
摘要:
ALTER procedure P_Test(@startdate nvarchar(50),@enddate nvarchar(50),@companyid int,@depid nvarchar(50))asdeclare @id int --定义变量来保存ID号declare @code_cursor nvarchar(50) --定义变量来保存ID号begin trandeclare mycursor cursor for select A.codefrom dbo.T_OfficeCardException A left outer join T_EMPLOYEEBASEINFO D 阅读全文
摘要:
--最新的模糊查询的方法declare @s nvarchar(50)select @s=BillNo from dbo.T_Receipt where ID='976d57fa-ee94-4a8d-9ce8-d54c694eea14'if(@s like '45%')beginprint 'adsfas'end 阅读全文
摘要:
--得到触发器的名字select type,xtype, * from sysobjects where xtype='tr'--得到触发器的其他信息select * from sysobjects where id in(select parent_obj from sysobjects where xtype='tr') 阅读全文
摘要:
select syscolumns.*, systypes.* from syscolumns left join systypes on syscolumns.xusertype=systypes.xusertype where id in (select id from sysobjects where name='存储过程的名字' ) 阅读全文