<%@ Page Language="C#" masterpagefile="~/Main.master" AutoEventWireup="true" CodeFile="GwStrategyUpdate.aspx.cs" Inherits="_GwStrategyUpdate" %>
|
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="Server">
|
<form name="Form_ID" method="post" action="GwStrategyUpdate.aspx" id="Form_ID" enctype="multipart/form-data">
|
<%if (Action == "edit")
|
{%>
|
<input type="hidden" name="action" value="editDeal" id="action" />
|
<%}
|
else
|
{ %>
|
<input type="hidden" name="action" value="addDeal" id="action" />
|
<%} %>
|
<div class="editCanvas">
|
<table class="table table-striped table-bordered table-hover">
|
<thead>
|
<tr>
|
<th colspan="4">
|
<%if (Action == "edit")
|
{ %>修改<%}
|
else
|
{ %>添加<%} %>
|
拦截策略
|
</th>
|
</tr>
|
</thead>
|
<%if (Action == "edit")
|
{ %>
|
<tr>
|
<th>
|
策略名称:
|
<input type="hidden" name="StrategyId" id="StrategyId" maxlength="50" value="<%= GwStrategy.StrategyId%>" />
|
</th>
|
<td>
|
<input type="text" name="StrategyName" id="StrategyName" style="width: 400px" maxlength="100"
|
value="<%= GwStrategy.StrategyName %>" />
|
<span class="highlight">*</span>
|
</td>
|
</tr>
|
<%}
|
else
|
{%>
|
<tr>
|
<th>
|
策略名称:
|
</th>
|
<td colspan="3">
|
<input type="text" name="StrategyName" id="StrategyName" style="width: 400px" maxlength="100"
|
value="<%= GwStrategy.StrategyName %>" />
|
<span class="highlight">*</span>
|
</td>
|
</tr>
|
<%} %>
|
<tr>
|
<th style="word-wrap: break-word; word-break: break-all">
|
关键词列表
|
<br />
|
每行一个关键字
|
</th>
|
<td colspan="3">
|
<textarea style="width: 99%; height: 80%;" cols="100" rows="20" name="WordList" id="WordList"><%= GwStrategy.WordList %></textarea><span
|
class="highlight">*</span>
|
</td>
|
</tr>
|
<tr>
|
<th>
|
关键词测试
|
</th>
|
<td colspan="3">
|
<div id="result-box">
|
</div>
|
<div id="match-box">
|
<input value="" name="SrcContent" type="text" id="SrcContent" maxlength="200" style="width: 600px;" />
|
<a href="javascript:;" id="MatchButton" style="background-color: #009900; color: #FFFFFF;
|
text-align: center; width: 60px; padding: 5px; display: inline-block; border: 1px solid #666;">
|
测试</a>
|
</div>
|
</td>
|
</tr>
|
<tr>
|
<th>
|
</th>
|
<td colspan="3">
|
<input class="btn btn-primary" value="保 存" type="submit" />
|
<input class="btn btn-primary" value="返 回" onclick="history.back();" type="button" />
|
</td>
|
</tr>
|
</table>
|
</div>
|
</form>
|
<script>
|
$(function () {
|
$("textarea").numberedtextarea();
|
|
$("#MatchButton").on("click", function () {
|
var wordList = $("#WordList").val();
|
var srcContent = $("#SrcContent").val();
|
|
$.ajax({
|
url: "gwstrategy.ashx",
|
method: "POST",
|
data: { wordList: wordList, srcContent: srcContent },
|
success: function (result) {
|
if (result.OK) {
|
$("#result-box").text(result.Message);
|
}
|
},
|
error: function (result) {
|
alert(result);
|
}
|
});
|
});
|
});
|
|
</script>
|
</asp:Content>
|