⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ad_makejs.asp

📁 该软件是帮助大学生更好的生活
💻 ASP
📖 第 1 页 / 共 2 页
字号:
strJS+="&ShowIncludePic="+document.myform.ShowIncludePic.checked;
strJS+="&ShowTitle="+document.myform.ShowTitle.checked;
strJS+="&ShowUpdateTime="+document.myform.ShowUpdateTime.checked;
strJS+="&ShowHits="+document.myform.ShowHits.checked;
strJS+="&ShowAuthor="+document.myform.ShowAuthor.checked;
strJS+="&ShowHot="+document.myform.ShowHot.checked;
strJS+="&ShowMore="+document.myform.ShowMore.checked;
strJS+="&TitleMaxLen="+document.myform.TitleMaxLen.value;
strJS+="&ContentMaxLen="+document.myform.ContentMaxLen.value;
strJS+="&Hot="+document.myform.Hot.checked;
strJS+="&Elite="+document.myform.Elite.checked;
strJS+="&DateNum="+document.myform.DateNum.value;
strJS+="&OrderField="+document.myform.OrderField.value;
strJS+="&OrderType="+document.myform.OrderType.value;
strJS+="'></";
strJS+="script";
strJS+=">\n<!--代码结束-->";
document.myform.JsCode.value=strJS;
}
</script>
<%
end sub

sub JS_Pic()
%>
<form action="" method="post" name="myform" id="myform">
  <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
    <tr class="title"> 
      <td height="22" colspan="2" align="center"><strong>首页图文的JS代码</strong></td>
    </tr>
    <tr class="tdbg"> 
      <td height="25" align="right">所属栏目:</td>
      <td height="25"><select name="ClassID" id="ClassID"><option value="0">不指定栏目</option>
          <%call Admin_ShowClass_Option(2,0)%>
        </select>
        <font color="#0000FF">&nbsp;&nbsp;不能指定为外部栏目</font>&nbsp;&nbsp;&nbsp;&nbsp;
        <input name="IncludeChild" type="checkbox" id="IncludeChild" value="True" checked>
        包含子栏目</td>
    </tr>
    <tr class="tdbg">
      <td height="25" align="right">所属专题:</td>
      <td height="25">
        <%call Admin_ShowSpecial_Option(1,SpecialID)%>
      </td>
    </tr>
    <tr class="tdbg"> 
      <td height="25" align="right">文章数目:</td>
      <td height="25"><input name="ArticleNum" type="text" value="10" size="5" maxlength="3"> 
        &nbsp;&nbsp;&nbsp;&nbsp;<font color="#FF0000">如果为空,则显示所有文章</font></td>
    </tr>
    <tr class="tdbg"> 
      <td height="25" align="right">显示类型:</td>
      <td height="25"><select name="ShowType" id="select">
          <option value="3" selected>图片+标题</option>
          <option value="4">图片+标题+内容</option>
        </select>
      </td>
    </tr>
    <tr class="tdbg"> 
      <td height="50" align="right">显示内容:</td>
      <td height="50"> 
        <input name="ShowClassName" type="checkbox" id="ShowClassName" value="True">
        文章栏目&nbsp;&nbsp;&nbsp;&nbsp; 
        <input name="ShowTitle" type="checkbox" id="ShowTitle" value="True" checked disabled>
        文章标题
        <input type="checkbox" name="checkbox2" value="checkbox">
        文章内容&nbsp;&nbsp;&nbsp;&nbsp; 
        <input name="ShowUpdateTime" type="checkbox" id="ShowUpdateTime" value="True">
        更新时间<br>
        <input name="ShowHits" type="checkbox" id="ShowHits" value="True">
        点击次数&nbsp;&nbsp;&nbsp;&nbsp; <input name="ShowAuthor" type="checkbox" id="ShowAuthor" value="True">
        作者&nbsp;&nbsp;&nbsp;&nbsp; <input name="ShowHot" type="checkbox" id="ShowHot" value="True" checked>
        热点文章标志
        <input name="ShowMore" type="checkbox" id="ShowMore" value="True">
        “更多……”字样</td>
    </tr>
    <tr class="tdbg"> 
      <td height="25" align="right">标题最多字符数:</td>
      <td height="25"><input name="TitleMaxLen" type="text" id="TitleMaxLen" value="30" size="5" maxlength="3"> 
        &nbsp;&nbsp;&nbsp;&nbsp;<font color="#FF0000">如果为空,则显示完整标题。字母算一个字符汉字算两个字符。</font></td>
    </tr>
    <tr class="tdbg">
      <td height="25" align="right">文章内容字符数:</td>
      <td height="25"><input name="ContentMaxLen" type="text" id="ContentMaxLen" value="200" size="5" maxlength="3">
        &nbsp;&nbsp;&nbsp;&nbsp;<font color="#FF0000">只有当显示类型设为“图片+标题+内容”时才有效</font></td>
    </tr>
    <tr class="tdbg"> 
      <td height="25" align="right">文章属性:</td>
      <td height="25"> <input name="Hot" type="checkbox" id="Hot" value="True">
        热门文章&nbsp;&nbsp;&nbsp;&nbsp; <input name="Elite" type="checkbox" id="Elite" value="True">
        推荐文章 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="#FF0000">如果都不选,将显示所有文章</font></td>
    </tr>
    <tr class="tdbg"> 
      <td height="25" align="right">日期范围:</td>
      <td height="25">只显示最近 
        <input name="DateNum" type="text" id="DateNum" value="10" size="5" maxlength="3">
        天内的文章&nbsp;&nbsp;&nbsp;&nbsp;<font color="#FF0000">如果为空,则显示所有天数的文章</font></td>
    </tr>
    <tr class="tdbg"> 
      <td height="25" align="right">排序字段:</td>
      <td height="25"><select name="OrderField" id="OrderField">
          <option value="ArticleID" selected>文章ID</option>
          <option value="UpdateTime">更新时间</option>
          <option value="Hits">点击次数</option>
        </select> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;排序方法: 
        <select name="OrderType" id="OrderType">
          <option value="asc">升序</option>
          <option value="desc" selected>降序</option>
        </select></td>
    </tr>
    <tr class="tdbg"> 
      <td height="25" align="right">首页图片设置:</td>
      <td height="25">&nbsp;宽度: 
        <input name="ImgWidth" type="text" id="ImgWidth" value="180" size="5" maxlength="3">
        像素&nbsp;&nbsp;&nbsp;&nbsp;高度: <input name="ImgHeight" type="text" id="ImgHeight" value="120" size="5" maxlength="3">
        像素</td>
    </tr>
    <tr class="tdbg"> 
      <td height="40" colspan="2" align="center"><input name="SystemPath" type="hidden" id="SystemPath" value="<%= "http://"&request.servervariables("server_name")&replace(lcase(request.servervariables("url")),"ad_makejs.asp","") %>"> 
        <input name="MakeJS" type="button" id="MakeJS" onclick="makejs();" value="生成JS代码"> 
        &nbsp;&nbsp; <input name="Copy" type="button" id="Copy" value="复制到剪贴板 " onclick="copy();"> 
        &nbsp;&nbsp; <input type="reset" name="Reset" value="恢复默认值"></td>
    </tr>
    <tr class="tdbg"> 
      <td height="40" colspan="2" align="center"><textarea name="JsCode" cols="80" rows="10" id="JsCode"></textarea></td>
    </tr>
    <tr class="tdbg"> 
      <td height="60" colspan="2">使用方法:<br>
        &nbsp;&nbsp;&nbsp;&nbsp;首先设定各选项,然后点“生成JS代码”,最后将生成的JS代码复制到网页代码的相应位置处即可。可参看js.htm文件中范例。<font color="#0000FF">有关字体、字号、颜色及行距等属性的设置,请自行在调用代码的页面用CSS进行设置。</font></td>
    </tr>
  </table>
</form>
<script language="JavaScript" type="text/JavaScript">
function makejs()
{
if(document.myform.ClassID.value=="")
{
	alert("文章栏目不能指定外部栏目!");
	document.myform.ClassID.focus();
	return false;
}
var strJS;
strJS="<!--代码开始-->\n<";
strJS+="script language='JavaScript' type='text/JavaScript' src='";
strJS+=document.myform.SystemPath.value+"article_js.asp"
strJS+="?ClassID="+document.myform.ClassID.value;
strJS+="&IncludeChild="+document.myform.IncludeChild.checked;
strJS+="&SpecialID="+document.myform.SpecialID.value;
strJS+="&ArticleNum="+document.myform.ArticleNum.value;
strJS+="&ShowType="+document.myform.ShowType.value;
strJS+="&ShowClassName="+document.myform.ShowClassName.checked;
strJS+="&ShowTitle="+document.myform.ShowTitle.checked;
strJS+="&ShowUpdateTime="+document.myform.ShowUpdateTime.checked;
strJS+="&ShowHits="+document.myform.ShowHits.checked;
strJS+="&ShowAuthor="+document.myform.ShowAuthor.checked;
strJS+="&ShowHot="+document.myform.ShowHot.checked;
strJS+="&ShowMore="+document.myform.ShowMore.checked;
strJS+="&TitleMaxLen="+document.myform.TitleMaxLen.value;
strJS+="&ContentMaxLen="+document.myform.ContentMaxLen.value;
strJS+="&Hot="+document.myform.Hot.checked;
strJS+="&Elite="+document.myform.Elite.checked;
strJS+="&DateNum="+document.myform.DateNum.value;
strJS+="&OrderField="+document.myform.OrderField.value;
strJS+="&OrderType="+document.myform.OrderType.value;
strJS+="&ImgWidth="+document.myform.ImgWidth.value;
strJS+="&ImgHeight="+document.myform.ImgHeight.value;
strJS+="'></";
strJS+="script";
strJS+=">\n<!--代码结束-->";
document.myform.JsCode.value=strJS;
}
</script>
<%
end sub
%>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -