随便写写

1.asp中简单分页  分页中加条件 以至于下一页不缺少

If request("type")<>"" then
url1="&type="&request("type")
End If

searchurlall=url1

 

<%

rs_q.pagesize=10 '每页显示几个数据
pagenum=rs_q.pagesize
totalpages=rs_q.pagecount
currentpage=request("page")
if currentpage="" then currentpage=1
if not isNumeric(currentpage) then
currentpage=1
elseif Cint(currentpage)>totalpages then
currentpage=totalpages
end if
currentpage=Cint(currentpage)
rs_q.absolutepage=currentpage

for i=1 to rs_q.pagesize
if rs_q.eof then exit for


%>

<%
rs_q.movenext
next
%>
<%else%>

<div class="mail-shop-con" id="nofind">

<div class="nofind">
<p>暂无您要的数据</p>
</div>

</div>
<div class="noData" style="background:#FFF;display:none;">
<p>暂无您要的数据</p>
</div>

 


<% End If
rs_q.Close
set rs_q=Nothing
%>

<%
if totalpages>1 then
%>

<div data-role="widget-pagination">
<%
if currentpage<>1 and totalpages<>0 Then

response.write "<a href=?page="&currentpage-1&""&searchurlall&">上一页</a>"
else
response.write "<a>上一页</a>"
end if
%>

<div>
<a class="widget-pagination-current-page" ><%=currentpage%>/<%=totalpages%></a>
<select name="select" class="widget-pagination-pages" onchange="javascript:window.location.href='?page='+this.options[this.selectedIndex].value+'<%=searchurlall%>'">
<% For i=1 To totalpages%>
<option value="<%=i%>" <%if i=currentpage Then response.write "selected" End if%>><%=i%>/<%=totalpages%></option>
<%next%>
</select>
</div>

<%
if currentpage<>totalpages and totalpages<>0 Then

response.write "<a href='?page="&currentpage+1&searchurlall&"'>下一页</a>"
else
response.write "<a>下一页</a>"
end if
%>

 

</div>

<%End if%>

 

2.asp中批量修改/删除

set rs_q=server.CreateObject("adodb.recordset")
sql_q="Select * from BK_KHXX_RECORD where KHID="&id&" "
rs_q.open sql_q,conn,1,3
‘If Not (rs_q.eof and rs_q.bof) Then

do while not rs_q.eof
rs_q("KHMC")=clientname

rs_q.update
rs_q.movenext
loop

rs_q.close
set rs_q = Nothing

3.关于sql 

两个用户同一个毫秒访问一个数据库,对其进行操作, 用事务或者表加速不是很好,在程序端做控制,用队列 ...

4.ajax

paramdata = {khlx:khlx,mdlx:mdlx,azlx:azlx};

$.ajax({
  type:"POST",
       dataType: "json",
  url:"customer_action.do?action=search",
       data:paramdata,
  success:function(msg){
if(msg.code=="500")
alert(msg.tips);
//$.alert(msg.tips, function () {
// window.location.href = "";
// });
return;

  },
  error:function(xhr,errorText,errorType){
    if(xhr.status == 401){
      //do something
    }
$.hideLoading();
alert("添加失败,网络太慢或异常,请稍后重试")
  },
  complete:function(){
    $.hideLoading();
  }

})

});

 5.css椭圆

background-color: #eae8e8;
border-bottom-right-radius:15px;
border-bottom-left-radius:15px;

border-top-left-radius:15px;
border-top-right-radius:15px;

6.获取span 标签之间的值

var mdlx = $(".mdlx dd span.active").html(); 

7.“没有为请求的 URL 配置默认文档,并且没有在服务器上启用目录浏览”及解决方案

解决方案:在web.config文件中添加下面这段代码,就可以了

  1. <system.webServer>
  2.  <directoryBrowse enabled="true" />
  3. </system.webServer>
     
     
     
     
     

    ASCII码对应表

    chr(9) tab空格       chr(10) 换行      chr(13) 回车        Chr(13)&chr(10) 回车换行       chr(32) 空格符       chr(34) 双引号       chr(39) 单引号chr(33) !        chr(34) "        chr(35) #        chr(36) $        chr(37) %        chr(38) &        chr(39) '        chr(40) (        chr(41) )        chr(42) *

    chr(43) +        chr(44) ,        chr(45) -        chr(46) .        chr(47) /

    chr(58)            chr(59) ;        chr(60) <        chr(61) =        chr(62) >        chr(63) ?        chr(64) @

     
posted @ 2020-06-08 10:44  波小白  阅读(159)  评论(0编辑  收藏  举报