URLgen 0.2b 数字URL序列生成

类别:编程语言 点击:0 评论:0 推荐:

<html>
<style type="text/css">
<!--
.form {  font-family: "Verdana"; font-size: xx-small; color: #0080ac}
.text {  font-family: "黑体"; font-size: x-small; color: #CC3300; filter: DropShadow(Color=#bbbbbb, OffX=1, OffY=1, Positive=120)}
-->
</style>
<head>
<title>URLgen 0.2b
</title>
</head>
<script language="JavaScript">
<!--
function GetCookie(sName)
 {
 var aCookie=document.cookie.split(";");
 for (var i=0; i < aCookie.length; i++)
  {
  var aCrumb=aCookie[i].split("=");aCrumb[0]=trim(aCrumb[0]);
  if(sName==aCrumb[0])
  return unescape(aCrumb[1]);
    }
 return null;
}

function SetCookie(sName, sValue)
 {
 document.cookie=sName+"="+escape(sValue)+";expires=Mon, 31 Dec 2100 23:59:59 UTC;";
 }

function trim(string)
 {
 var str2="";
 for(var i=0;i<string.length;i++)
  if(string.charAt(i)!=" ")
   str2+=string.charAt(i);
 return str2;
 }

function load_form()
 {
 if(GetCookie("PF")==null) return;
        document.form.pf.value=GetCookie("PF");
 document.form.sf.value=GetCookie("SF");
        document.form.start.value=GetCookie("S");
        document.form.end.value=GetCookie("E");
 document.form.fill.status=false;
 if(GetCookie("FF")=="true") document.form.fill.status=true;
 }

function gen_url()
 {
 the_prefix=document.form.pf.value;
 the_suffix=document.form.sf.value;
 the_start=document.form.start.value;
 the_end=document.form.end.value;
 the_fill=document.form.fill.status;
 ff1="";
 ff2="";
 if (the_fill==true)
  {
  ff1="0";
  ff2="0";
  if(the_end<100) ff2="";
  }
 document.write("<html>\n<title>by sunyueming</title>\n")
 document.write("点右键,使用网际快车下载全部链接...<br>")
 for(i=the_start;i<=the_end ;i++)
  {
  ii=i;
  if(i<10) ii=ff1+ff2+i;
  if(i<100&&i>=10) ii=ff2+i;
  document.write("<A HREF='"+the_prefix+ii+the_suffix+"'>|"+ii+"|</A>\n");
  }
 document.write("</html>\n")
 SetCookie("PF",the_prefix);
 SetCookie("SF",the_suffix);
 SetCookie("S",the_start);
 SetCookie("E",the_end);
 SetCookie("FF",the_fill);
 }

//-->
</script>

<body onload="load_form()">
      <form name="form" method="post">
 <input type="input" size=80 name="pf" class="form" value="http://">
        <input type="input" size=2 name="start" class="form" value="1">-
        <input type="input" size=4 name="end" class="form" value="1">
        <input type="input" size=4 name="sf" class="form" value=".jpg"><p>
 <input type="checkbox" name="fill" value="x"><font color=#0080ac size=2>固定数字位数</font><p>
        <input type="submit" name="gen" class="form" value=" GEN " onClick="gen_url()">
      </form>
<table width="100%" border="0" cellpadding="2" cellspacing="0" class="text">
<tr>
<td>
 用于生成文件序列的URL  使用到了Cookie<br>
 URLgen|&copy 2004 S u n y u e m i n g
</td>
</tr>
</table>
</body>
</html>

本文地址:http://com.8s8s.com/it/it23766.htm