createlabel_ultimate.aspx
来自「这也是关于论坛的一个源代码」· ASPX 代码 · 共 438 行 · 第 1/2 页
ASPX
438 行
<tr class="TR_BG_list" id="TrPageID">
<td align="right" class="navi_link" style="width:105px;"><span id="spanPageID"></span>分页样式</td>
<td align="left" class="navi_link"><asp:TextBox ID="PageID" runat="server" CssClass="form" Width="120px"></asp:TextBox>
<input class="form" type="button" value="选择分页样式" onclick="javascript:show('PageID',document.getElementById('spanPageID'),'选择分页样式',410,200);" /></td>
</tr>
<tr class="TR_BG_list">
<td align="right" class="navi_link" style="width:105px">行参数控制</td>
<td align="left" class="navi_link">
奇数行背景CSS:<asp:TextBox ID="css1" Width="50" CssClass="form" runat="server"></asp:TextBox> 偶数行背景CSS:<asp:TextBox ID="css2" CssClass="form" Width="50" runat="server"></asp:TextBox>
</td>
</tr>
<tr class="TR_BG_list">
<td align="right" class="navi_link" style="width:105px">分行参数控制</td>
<td align="left" class="navi_link">
<asp:DropDownList ID="brTF" runat="server" CssClass="form" Width="200px" onchange="javascript:selectTF(this.value);">
<asp:ListItem Value="false">显示分行效果</asp:ListItem>
<asp:ListItem Value="true">是</asp:ListItem>
<asp:ListItem Value="false">否</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr class="TR_BG_list" id="divbrtf" style="display:none;">
<td align="right" class="navi_link" style="width:105px">定义分行参数</td>
<td align="left" class="navi_link">
<asp:TextBox ID="bfstr" Width="80%" CssClass="form" Text="0|5|CSS" runat="server"></asp:TextBox> 每行排列一个起作用<br />
<span class="reshow">
格式:0|5|css,第一个参数表示使用样式,第2个表示多少信息使用此设置,第3个参数表示具体参数<br />
0表示使用CSS样式,如:0|5|tableCSS <br />
1表示使用使用图片,如:1|5|/templet/br.gif <br />
2表示使用使用文字,如:2|5|----------------
</span>
</td>
</tr>
<tr class="TR_BG_list">
<td align="right" class="navi_link" style="width:105px;"></td>
<td align="left" class="navi_link"> <input class="form" type="button" value=" 确 定 " onclick="javascript:ReturnDivValue();" /> <input class="form" type="button" value=" 关 闭 " onclick="javascript:CloseDiv();" /></td>
</tr>
</table>
</form>
</body>
</html>
<script language="javascript" type="text/javascript">
function selectisDiv(type)
{
if(type=="true")
{ document.getElementById("TrulID").style.display=""; }
else
{ document.getElementById("TrulID").style.display="none"; }
}
function selectShowNavi(type)
{
if(type=="4")
{
document.getElementById("TrNaviPic").style.display="";
document.getElementById("TrNaviCSS").style.display="none";
}
else
{
if(type=="")
{
document.getElementById("TrNaviPic").style.display="none";
document.getElementById("TrNaviCSS").style.display="none";
}
else
{
document.getElementById("TrNaviPic").style.display="none";
document.getElementById("TrNaviCSS").style.display="";
}
}
}
function selectRoot(type)
{
if(type=="false")
{ document.getElementById("TrStyleID").style.display="none";document.getElementById("TrUserDefined").style.display=""; }
else
{ document.getElementById("TrStyleID").style.display="";document.getElementById("TrUserDefined").style.display="none"; }
}
function selectPage(type)
{
if(type=="false")
{ document.getElementById("TrPageID").style.display="none"; }
else
{ document.getElementById("TrPageID").style.display=""; }
}
function selectTF(type)
{
if(type=="false")
{ document.getElementById("divbrtf").style.display="none"; }
else
{ document.getElementById("divbrtf").style.display=""; }
}
function CloseDiv()
{
parent.document.getElementById("LabelDivid").style.display="none";
}
function spanClear()
{
document.getElementById("spanCols").innerHTML="";
document.getElementById("spanTitleNumer").innerHTML="";
document.getElementById("spanContentNumber").innerHTML="";
document.getElementById("spanNaviNumber").innerHTML="";
document.getElementById("sapnStyleID").innerHTML="";
}
function checkIsNull(obj,spanobj,error)
{
if(obj.value=="")
{
spanobj.innerHTML="<span class=reshow>(*)"+error+"</spna>";
return true;
}
return false;
}
function checkIsNumber(obj,spanobj,error)
{
var re = /^[0-9]*$$/;
if(re.test(obj.value)==false)
{
spanobj.innerHTML="<span class=reshow>(*)"+error+"</spna>";
return true;
}
return false;
}
function ReturnDivValue()
{
spanClear();
var CheckStr=true;
if(checkIsNumber(document.ListLabel.Cols,document.getElementById("spanCols"),"每行显示条数只能为正整数"))
CheckStr=false;
if(checkIsNumber(document.ListLabel.TitleNumer,document.getElementById("spanTitleNumer"),"标题显示字数只能为正整数"))
CheckStr=false;
if(checkIsNumber(document.ListLabel.ContentNumber,document.getElementById("spanContentNumber"),"内容截取字数只能为正整数"))
CheckStr=false;
if(checkIsNumber(document.ListLabel.NaviNumber,document.getElementById("spanNaviNumber"),"导航截取字数只能为正整数"))
CheckStr=false;
if(document.ListLabel.Root.value=="true")
{
if(checkIsNull(document.ListLabel.StyleID,document.getElementById("sapnStyleID"),"请选择样式"))
CheckStr=false;
}
var rvalue="[FS:Loop,FS:SiteID=<%Response.Write(APIID); %>,FS:LabelType=ClassList";
if(document.ListLabel.Root.value=="true")
{ temproot = "[#FS:StyleID=" + document.ListLabel.StyleID.value+"]"; }
else
{
var oEditor = FCKeditorAPI.GetInstance("UserDefined");
temproot = oEditor.GetXHTML(true);
}
rvalue += ",FS:ListType=" + document.ListLabel.ListType.value;
if(document.ListLabel.isSub.value!=""){ rvalue += ",FS:isSub=" + document.ListLabel.isSub.value; }
if(document.ListLabel.SubNews.value!=""){ rvalue += ",FS:SubNews=" + document.ListLabel.SubNews.value; }
if(document.ListLabel.Cols.value!=""){ rvalue += ",FS:Cols=" + document.ListLabel.Cols.value; }
if(document.ListLabel.Desc.value!=""){ rvalue += ",FS:Desc=" + document.ListLabel.Desc.value; }
if(document.ListLabel.DescType.value!=""){ rvalue += ",FS:DescType=" + document.ListLabel.DescType.value; }
if(document.ListLabel.isDiv.value!=""){ rvalue += ",FS:isDiv=" + document.ListLabel.isDiv.value; }
if(document.ListLabel.isDiv.value=="true")
{
if(document.ListLabel.ulID.value!=""){ rvalue += ",FS:ulID=" + document.ListLabel.ulID.value; }
if(document.ListLabel.ulClass.value!=""){ rvalue += ",FS:ulClass=" + document.ListLabel.ulClass.value; }
}
if(document.ListLabel.brTF.value=="true")
{
rvalue += ",FS:bfStr=" + document.ListLabel.bfstr.value;
}
if(document.ListLabel.isPic.value!=""){ rvalue += ",FS:isPic=" + document.ListLabel.isPic.value; }
if(document.ListLabel.TitleNumer.value!=""){ rvalue += ",FS:TitleNumer=" + document.ListLabel.TitleNumer.value; }
if(document.ListLabel.ContentNumber.value!=""){ rvalue += ",FS:ContentNumber=" + document.ListLabel.ContentNumber.value; }
if(document.ListLabel.NaviNumber.value!=""){ rvalue += ",FS:NaviNumber=" + document.ListLabel.NaviNumber.value; }
if(document.ListLabel.ShowNavi.value!=""){ rvalue += ",FS:ShowNavi=" + document.ListLabel.ShowNavi.value; }
if(document.ListLabel.ShowNavi.value=="4")
{ if(document.ListLabel.NaviPic.value!=""){ rvalue += ",FS:NaviPic=" + document.ListLabel.NaviPic.value; } }
if(document.ListLabel.ShowNavi.value!=""&&document.ListLabel.ShowNavi.value!="4"){ rvalue += ",FS:NaviCSS=" + document.ListLabel.NaviCSS.value; }
if(document.ListLabel.css1.value!=""&&document.ListLabel.css2.value!=""){ rvalue += ",FS:ColbgCSS=" + document.ListLabel.css1.value+"|"+document.ListLabel.css2.value; }
if(document.ListLabel.isPage.value=="true")
{ if(document.ListLabel.PageID.value!=""){ rvalue += "," + document.ListLabel.PageID.value; } }
rvalue += "]";
rvalue += temproot;
rvalue += "[/FS:Loop]";
if(CheckStr)
parent.getValue(rvalue);
}
function getValue(value)
{
var oEditor = FCKeditorAPI.GetInstance("UserDefined");
if (oEditor.EditMode==FCK_EDITMODE_WYSIWYG)
{
oEditor.InsertHtml(value);
}
else
{
return false;
}
}
function setValue(value)
{
var oEditor = FCKeditorAPI.GetInstance("UserDefined");
if (oEditor.EditMode==FCK_EDITMODE_WYSIWYG)
{
oEditor.InsertHtml('{FS:define='+value+'}');
}
else
{
return false;
}
}
</script>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?