日期:2014-05-16 浏览次数:20952 次
<html>
<head>
</head>
<body>
<input name="Sj" id="Sj" type="text" value="1,2,3,4,5" />
</body>
<script>
var aimInput = document.getElementById("Sj");
var value = aimInput.value;
var numArray = value.split(",");
aimInput.value= numArray.join("or");
</script>
</html>
<%
Dim arr
arr=Split("1,2,3,4,5",",")
Response.write "instr(filename,"""&Join(arr,""") or instr(filename,""")&""")"
%>
if instr(filename,".jpg") or instr(filename,".bmp") or instr(filename,".png") or instr(filename,".gif") then
'改成下面的代码试试
Dim arrExt, arrTemp
arrExt = Split(".jpg,.bmp,.png,.gif", ",")
arrTemp = "instr(filename,"""&Join(arrExt, """) or instr(filename,""")&""")"
If Eval(arrTemp) Then
<%
file_ext=get_ext(filename) '定义一个函数获取它的真实后缀名(此函数省略)
if instr(".jpg,.bmp,.png,.gif",file_ext)>0 then '一个instr就完成,搞什么飞机要那么复杂!
%>