123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- {include file="public/layout" /}
-
- <body class="bodystyle" style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;min-width: auto;padding-bottom: 0px;">
- <div id="append_parent"></div>
- <div id="ajaxwaitid"></div>
- <div style="min-width: auto;box-shadow:none;">
- <form class="form-horizontal" id="postForm" method="post">
- <div class="ncap-form-default">
- <dl class="row">
- <dt class="tit">
- <label for="word"><em>*</em>关键词列表</label>
- </dt>
- <dd class="opt" style="width: auto;">
- <textarea style="width:250px; height:300px;" name="word" id="word" placeholder="一行代表一个关键词"></textarea>
- <span class="err"></span>
- <p class="notic"></p>
- </dd>
- </dl>
- <dl class="row">
- <dt class="tit">
- <label for="searchNum">搜索次数</label>
- </dt>
- <dd class="opt" style="width: auto;">
- <input type="text" value="0" name="searchNum" id="searchNum" class="input-txt" autocomplete="off" onkeyup="this.value=this.value.replace(/[^\d]/g,'');" onpaste="this.value=this.value.replace(/[^\d]/g,'')">
- <p class="notic"></p>
- </dd>
- </dl>
- <dl class="row">
- <dt class="tit">
- <label for="is_hot">是否热搜</label>
- </dt>
- <dd class="opt" style="width: auto;">
- <label class="curpoin"><input type="radio" name="is_hot" value="1">是</label>
- <label class="curpoin"><input type="radio" name="is_hot" value="0" checked="checked">否</label>
- <span class="err"></span>
- <p class="notic"></p>
- </dd>
- </dl>
- <div class="bot">
- <a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
- </div>
- </div>
- </form>
- </div>
-
- <script type="text/javascript">
-
- var parentObj = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- function checkForm(){
-
- if($('input[name=word]').val() == ''){
- showErrorMsg('关键词列表不能为空!');
- $('input[name=word]').focus();
- return false;
- }
-
- layer_loading('正在处理');
-
- $.ajax({
- type : 'post',
- url : "{:url('Search/batch_add', ['_ajax'=>1])}",
- data : $('#postForm').serialize(),
- dataType : 'json',
- success : function(res){
- layer.closeAll();
- if(res.code == 1){
- var _parent = parent;
- _parent.layer.close(parentObj);
- _parent.layer.msg(res.msg, {shade: 0.1, time: 1000}, function(){
- _parent.window.location.reload();
- });
- }else{
- showErrorMsg(res.msg);
- }
- },
- error: function(e){
- layer.closeAll();
- layer.alert(e.responseText, {icon: 5, title:false});
- }
- });
- }
- </script>
-
- <script type="text/javascript">
- $(document).ready(function(){
- $('#think_page_trace_open').css('z-index', 99999);
- });
- </script>
- </body>
- </html>
|