标题<input name="ContentForm$ctl03$Field$ModelControlID$TxtTitle" type="text" maxlength="255" size="80" id="ContentForm_ctl03_Field_ModelControlID_TxtTitle" name="titles" class="inputtext" />链接<input name="ContentForm$ctl11$Field$ModelControlID$TxtSource" type="text" maxlength="255" size="50" id="ContentForm_ctl11_Field_ModelControlID_TxtSource" name="links" class="inputtext" /> <input type="button" value="Go" onclick="setLink()"/> function setLink() { var link = document.getElementByName("links")[0].value; var title = document.getElementByName("titles")[0].value; var url = "http://www.yulecc.com/User/Contents/Content.aspx?nodeId=114&modelId=1&Action=add&u=" + link + "&t=" + v; window.location = url; }
放在页面html代码的head中即可 <head> <title>....</title> ...... <script type="text/javascript"> function setLink() { var link = document.getElementByName("links")[0].value; var title = document.getElementByName("titles")[0].value; var url = "http://www.yulecc.com/User/Contents/Content.aspx?nodeId=114&modelId=1&Action=add&u=" + link + "&t=" + v; window.location = url; }
<input type="button" value="Go" onclick="setLink()"/>
function setLink() {
var link = document.getElementByName("links")[0].value;
var title = document.getElementByName("titles")[0].value;
var url = "http://www.yulecc.com/User/Contents/Content.aspx?nodeId=114&modelId=1&Action=add&u=" + link + "&t=" + v;
window.location = url;
}
<head>
<title>....</title>
......
<script type="text/javascript">
function setLink() { var link = document.getElementByName("links")[0].value; var title = document.getElementByName("titles")[0].value; var url = "http://www.yulecc.com/User/Contents/Content.aspx?nodeId=114&modelId=1&Action=add&u=" + link + "&t=" + v; window.location = url; }
</script>
</head>
ValidateRequest="false" Inherits="PowerEasy.SiteFactory.WebSite.User.Contents.Content" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<pe:ExtendedSiteMapPath ID="YourPosition" SiteMapProvider="UserMapProvider" runat="server" />
<form id="MainForm" runat="server">
<asp:ScriptManager ID="SmContent" runat="server" ScriptMode="Release" EnablePartialRendering="true">
</asp:ScriptManager>
<div class="model_content_wrap">
<div class="model_content_top">
<h3>
<pe:AlternateLiteral ID="LblTitle" Text="<%$ Res: User_Contents_Content_LblTitle,添加内容信息 %>"
AlternateText="<%$ Res: User_Contents_Content_LblTitle_AlternateText,修改内容信息 %>"
runat="Server" /></h3>
</div>
<div class="model_content_center">
<ul class="add_model_content">
<pe:ExtendedRepeater ID="ContentForm" OnItemDataBound="ContentForm_OnItemDataBound"
runat="server">
<ItemTemplate>
<li>
<label>
<%# Eval("FieldAlias")%>:<%# (Eval("Tips") == null || string.IsNullOrEmpty(Eval("Tips").ToString())) ? "" : "<br />" + Eval("Tips").ToString()%></label>
<pe:FieldControl ID="Field" runat="server" EnableNull='<%# (bool)Eval("EnableNull") %>'
FieldAlias='<%# Eval("FieldAlias")%>' Tips='<%# Eval("Tips") %>' FieldName='<%#Eval("FieldName")%>'
ControlType='<%# Eval("FieldType") %>' FieldLevel='<%# Eval("FieldLevel") %>'
IsAdminManage="false" Description='<%# Eval("Description")%>' Settings='<%# ((PowerEasy.SiteFactory.Model.CommonModel.FieldInfo)Container.DataItem).Settings %>'
Value='<%# Eval("DefaultValue") %>'>
</pe:FieldControl>
</li>
</ItemTemplate>
</pe:ExtendedRepeater>
</ul>
<div class="submit_model_content">
<asp:Button ID="BtnSave" runat="server" CssClass="submit_button" Text="<%$ Res: User_Contents_Content_BtnSave,提交 %>"
OnClick="BtnSave_Click" />
</div>
</div>
</div>
</form>
</body>
</html>