获取字符串长度的函数(ASP/VB/JS)

青锋幽灵 18年前6月7日 阅读:230 评论:0


function strLen(str){      
	var len=0;      
	for(var i=0;i<str.length;i++){      
		var intCode=str.charCodeAt(i);      
		if(intCode>=0 &amp;&amp; intCode<=128){      
			len = len + 1;      
		}else{      
			len = len + 2;      
		}      
	}      
    return len;      
}



Private Function Length(iTxt)   
	Dim txt: txt = Trim(iTxt)   
	Dim x: x = Len(txt)   
...

VB将域名转换成IP地址

青锋幽灵 18年前4月8日 阅读:330 评论:0


Option Explicit   
  
Private Type HOSTENT   
	hName As Long  
	hAliases As Long  
	hAddrType As Integer  
	hLength As Integer  
	hAddrList As Long  
End Type   
  
Private Type WSADATA   
	wversion As Integer  
	wHighVersion As Integer  
	szDescription(0 To 256) As Byte  
	szSystemStatus(0 To 128) As Byte  
	iMaxSockets As Integer  
	iMaxUdpDg As Integer  
	lpszVendorInfo As Long...

VB获取系统运行时间

青锋幽灵 18年前4月5日 阅读:190 评论:0


Private Declare Function GetTickCount&amp; Lib "kernel32" ()   
  
Dim a As Long  
Dim b As Long  
Dim c As Long  
Dim d As Long  
Dim e As Long  
  
Private Sub Form_Load()   
	'   
End Sub  
  
Private Sub Timer1_Timer()   
	a = GetTickCount \ 1000   
	b = GetTickCount \ 1000 \ 60   
	c = GetTickCount \ 1000 \ 60 \ 60   
	d = (a - c * 3600) \ 60   
	e = a - b * 6...


顶部