-
js兑现clone
js实现clone functioncloneObject(obj){ varresult=newObject(); varresultArray=newArray(); for(varvinobj){ varo=obj[v]; if(typeofo=="object"){ if(oinstanceofArray){ for(vari=0;i<o....
335
热度 -
javascript 取得网站路径
javascript获得网站路径 //获取当前网址,如:http://localhost:8080/Tmall/index.jsp varcurWwwPath=window.document.location.href; //获取主机地址之后的目录如:/Tmall/index.jsp varpathName=window.document.location.pathname; varpo...
285
热度 -
动态新增剔除表格行(复制整行)
动态新增删除表格行(复制整行) varrowIndex=0; functionaddLine(obj){ varobjSourceRow=obj.parentNode.parentNode; varobjTable=obj.parentNode.parentNode.parentNode.parentNode; if(obj.value=='增加'){ rowIndex++;...
37
热度 -
判断父节点上面是否有子节点
判断父节点下面是否有子节点 functionvaliChk(){ varchk=document.getElementsByName("chk"); varlength=chk.length; for(vari=0;i<length;i++){ if(chk[i].checked){ varsql="select*FROMRM_FACILITY_TYPEtwheret.par_type...
65
热度 -
JS挟制换行
JS强制换行 $(function(){ $(".word_break").each(function(){ varword=$(this).text(); varstep=25;//步长 varlen=word.length; if(len>step){ varnewWord=newArray(); for(vari=step;i<len+st...
199
热度 -
arcgis 限制1000条访问,循环读取形式
arcgis限制1000条访问,循环读取方式 --arcgis限制1000条访问,循环读取方式//数目如果超过1000条 if(array.length>1000){ varresultPage:Number=array.length/1000; if(array.length%1000!=0){ ++resul...
451
热度 -
jquery post传值乱码?该怎么处理
jquerypost传值乱码??????JScriptcode vart=null; varsave=function(o){ $("#loading").html('正在保存..'); varx=$('#saveContact_'+o).offset().left-15; vary=$('#saveContact_'+o).offset().top-10; $("#...
164
热度 -
js 两个以“,”分割的字符串去重,然后组合,该如何解决
js两个以“,”分割的字符串去重,然后组合varastr="a,b,c,d,"varbstr="a,c,f,e,w";我想要的结果是"a,b,c,d,f,e,w"请高手帮忙color='#e78608'>------解决方案--------------------JScriptcode varastr="a,b,c,d&quo...
542
热度 -
作用链有关问题
作用链问题code如下JScriptcode varcolor='blue'; functiongetcolor(){ varstring=color; varcolor='red'; alert(string);//结果是undefined! } getcolor(); 根据作用链规则,应该是输出‘blue’啊,请问为什么会输出undefined?谢谢!color='#e78608'>---...
300
热度 -
怎么将字符型数据转换为数值数据
如何将字符型数据转换为数值数据?有段字符型数据如:varaaa="123.456"怎么样把它转换为数值型数据:varbbb=123.456color='#e78608'>------解决方案--------------------varaaa="123.456";varbbb=eval(aaa); color='#e78608'>------解决方案----...
283
热度 -
怎么取得一个字符串中的逗号
如何取得一个字符串中的逗号我要取出这个逗号然后判断它是全角的还是半角的例如:varstrName="fsfes,fsdfes";请问如何取出这个逗号.谢谢color='#e78608'>------解决方案--------------------varstrName="fsfes,fsdfes";vara=strName.indexOf(",&qu...
92
热度 -
这个shell脚本在ksh环境中不能实施么、
这个shell脚本在ksh环境中不能执行么、、、??#!/bin/sh#要求用户输入数值,然后打印出该数值,直到用户输入"end"后才停止#vishow_var.shunsetvarecho"pleaseinputanumber:"readvarwhile["$var"!="end"]doecho"pleaseinputanumberagain:"readvarif["$var"="end"]th...
6500
热度 -
arcgis 限制1000条访问,循环读取形式
arcgis限制1000条访问,循环读取方式--arcgis限制1000条访问,循环读取方式//数目如果超过1000条 if(array.length>1000){ varresultPage:Number=array.length/1000; if(array.length%1000!=0){ ++result...
6266
热度 -
用js 怎样截取字符串?解决方案
用js怎样截取字符串?varstr="C:\DocumentsandSettings\dell\桌面\guanxi4.bmp"我只需要guanxi4.bmp用js怎样截取?color='#e78608'>------解决方案--------------------vartempstr=str.replace(/(\s*$)/g,"");vartempstr=...
816
热度 -
在JSP页面用JS处置从服务器返回的LIST集合
在JSP页面用JS处理从服务器返回的LIST集合 注:需要struts2框架,没有就不行附件中部分代码:<scripttype="text/javascript"> functiontest(){ vara="<%=request.getAttribute("parameterValue")%>"; varlist="<%=request.getAttrib...
19
热度 -
js步骤(2)
js方法(2) } if(isHtml.test(selected)){ this[0]=selected; this.length=1; returnthis; } if(reg.test(selected)||selected==="*"){ varl=this.getTagName(selected).length; vare=this.getTag...
100
热度 -
js 应验日期
js验证日期 functioncheckDate(date1,date2){varjsdate1=$('#'+date1);varjsdate2=$('#'+date2);vardateObj=newDate();vardateYear=dateObj.getYear();vardateMonth=dateObj.getMonth()+1;vardateDay=dateObj.getDate();...
125
热度 -
setInterval施用 每隔一定时间执行操作
setInterval使用每隔一定时间执行操作 <html> <head> <title>每5秒执行一次操作</title> <scriptlanguage="javascript"type="text/javascript"> functiontime1(){ vard=newDate(); varhour=d.getHours...
417
热度 -
clip施用之简单图片动画
clip应用之简单图片动画 #panel{ position:relative; } #panelimg{ position:absolute; top:0px; left:0px; } <divid="panel"> <imgid="img1"src="/img/1.jpg"width="500px"height="332px"/> </div> ...
105
热度 -
instanceof 判断引用类型,typeof判断基本门类
instanceof判断引用类型,typeof判断基本类型。 //instanceof判断引用类型,typeof判断基本类型。 functioninit(){ //testTypeof(); testInstanceof(); } window.onload=init; functiontestTypeof(){ varstr="123"; varnum=123; ...
536
热度