Home >Backend Development >PHP Tutorial >PHP 保存按钮点击无反应,菜鸟求关注求解答

PHP 保存按钮点击无反应,菜鸟求关注求解答

WBOY
WBOYOriginal
2016-06-23 14:01:391232browse

显示页面:

<?php  include($_SERVER['DOCUMENT_ROOT']."/auth.php"); $sql="select * from bydms_news where news_id='$_REQUEST[id]'";$query=mysql_query($sql);$us= is_array($row=mysql_fetch_array($query));if ($us){?><form id="news_updata" method="post"><input id="news_id" name="news_id"  type="hidden" value="<?php echo $_REQUEST[id];?>" />  <div class="pageFormContent">	<fieldset>		<legend>添加项目公告</legend>	  		<dl class="nowrap">			<dt>公告名称:</dt>			<dd>            <input id="news_title" name="news_title" type="text" class="easyui-validatebox" data-options="required:true" value="<?php echo $row[news_title];?>"  />			</dd>		</dl>		<dl class="nowrap">			<dt>公告类型:</dt>			<dd>            <input id="news_type" name="news_type" type="text" class="easyui-validatebox" data-options="required:true" value="<?php echo $row[news_type];?>" />			</dd>		</dl>      <dl class="nowrap">	    <dt>操作人:</dt>			<dd>            <input id="news_auther" name="news_auther" class="easyui-validatebox" value="<?php echo $MY_CNNAME;?>" required readonly/>            </dd>		</dl>              <dl class="nowrap">      <dt>内容:</dt>			<dd><textarea id="news_content" name="news_content" cols="60" rows="10" ><?php echo $row[news_content];?></textarea></dd>      </dl>      </fieldset>  </div>   <div style="padding:5px;border:1px solid #ddd;" >     <table cellpadding="0" cellspacing="0" style="width: 100%">      <tr>       <td height="19">填写提醒:请认真填写各项,谢谢。</td>       <td style="text-align: right">       <a id="baocun2"  href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="mysubmitform('news_updata','home/news/news_upa_data.php')">保存</a>       </td>     </tr>    </table>	</div> </form><?PHP }?>


数据页面:
<?phpinclude($_SERVER['DOCUMENT_ROOT']."/auth.php");//获取提交信息$news_id=$_POST[news_id];//公告ID$news_title=ereg_replace('[[:space:]]','',$_POST[news_title]);  //公告标题$news_content=ereg_replace('[[:space:]]','',$_POST[news_content]);  //公告内容$news_type=ereg_replace('[[:space:]]','',$_POST[news_type]); //公告类型$news_auther=ereg_replace('[[:space:]]','',$_POST[news_auther]); //操作人$news_date=mydate(); //时间$news_authernum=$MY_SYSNUMBER;//操作人编号//添加信息到数据库$sql_bydms_news_upa="update bydms_news set news_title='$news_title',news_content='$news_content',news_type='$news_type',news_date='$news_date',news_auther='$news_auther',news_authernum='$news_authernum' where news_id='$news_id'";//执行SQL语句mysql_query($sql_bydms_news_upa);//返回参数echo '{';echo '"success": true,'; echo '"messageid": "修改公告",';echo '"message": "修改公告成功!",'; echo '"icon": "question",';  echo '"myclose": "修改公告",'; echo '"myselect":"项目公告",'; echo '"mydatagui":"news_list",'; echo '"myrefresh":"home/news/news_list.php"'; echo '}';?>


function 函数
//表单提交function mysubmitform(fromid,url){$('#'+fromid).form('submit', {	url:url,	onSubmit: function(){	    return $(this).form('validate');	},	success: function(data){ 	   var data = eval('(' + data + ')'); 	          $.messager.alert(data.messageid,data.message,data.icon);	   if(data.success){	   //关闭tab选项卡	   $('#centertab').tabs('close', data.myclose);  //关闭指定面板	   $('#centertab').tabs('select', data.myselect); //定位指定面板	   $('#' + data.mydatagui).datagrid('reload');  // reload the user data	   }    }});}

测试点击保存按钮无反应,求解答,谢谢


回复讨论(解决方案)

框架是easyui

牛人呢????

哎,在线等啊!求解答啊

等等看吧,反正我看不懂!!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn