oninput onpropertychange 思明互动 智能互动
程序员文章站
2022-07-15 15:55:25
...
<textarea id="title" name="title" rows="5" cols="40" oninput="getchange1();" onpropertychange="getchange1();" >${ptitle}</textarea> $(document).ready(function(){ getchange1(); }); function getchange1(){ debugger; var title="${object.title}"; var content=$("#content").val(); var url="<%=request.getContextPath() %>/servlet/AjaxServlet?date="+new Date(); ajaxSend(title,content,"",url); } function ajaxSend(title,content,radio,url){ $.get(url,{title:title,content:content,radio:3,id:"${object.id}"},function(data){ //alert(data); if(data!=""){ var content=eval("("+data+")"); var b=content[0].list5;//*信箱 var d=content[0].title; //alert(d[0].title); var list= ''; list+= '<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0" align="center" class="h32 mar_t15 t14 " bgcolor="#FFFFFF"> '; $.each(d,function(i,n){ //list+= '<tr><input type="hidden" name="title" id="title" value="'+n.title+'"/> </tr>'; //list+= '<tr><input type="hidden" name="radio" id="radio" value="'+n.radio+'"/> </tr>'; }); list+= '<tr><th colspan="2" bgcolor="#e9f3fd">供您参考的答复</th> '; if(b.length>0){ list+= ' <td bgcolor="#e9f3fd" align="center"><a target="_blank" href="http://www.siming.gov.cn/zmhd/znhd/znhdxx/index.htm?url=common/jdbcPage.as?_in=outerquestion@014&more=1&title='+d[0].title+"&content="+d[0].content+"&radio="+d[0].radio+'">更多>></a></td> ' } var c=content[0].newList;//办事指南 var list1= ''; list1+= '<table width="100%" border="0" align="center" cellspacing="0" cellpadding="0" align="center" class="h32 mar_t15 t14 " bgcolor="#FFFFFF"> '; list1+= '<tr><th colspan="2" bgcolor="#e9f3fd">供您参考的有关办事程序</th> '; if(c.length>0){ list1+= ' <td bgcolor="#e9f3fd" align="center"><a target="_blank" href="http://www.siming.gov.cn/zmhd/znhd/znhdbs/index.htm?url=common/jdbcPage.as?_in=outerquestion@015&more=1&title='+d[0].title+"&radio="+d[0].radio+'">更多>></a></td> '; } $.each(b,function(i,n){ list+= ' </tr> '; list+= ' <tr> '; list+= ' <td width="4%" align="center">'+ '<img src="<%=request.getContextPath() %>/outer/search/news_gl_icon2.jpg " /> </td> '; list+= ' <td width="36%" colspan="2"> '; list+= ' <a title="'+n.title+'" href="http://www.siming.gov.cn/zmhd/smlh/index_1765.htm?url=common/hbnObject.as?_in=outerquestion@003&_url=/outer/question/detail.jsp&id='+n.id+'" target="_blank">'+n.gcstitle+'</a> '; list+= '</td> '; //list+= '<td width="10%" ><br>'; list+='</td> '; list+='</tr> '; //alert(i+n); }); list+= '</table>'; $("#zfxx").html(list); $.each(c,function(i,n){ list1+= ' </tr> '; list1+= ' <tr> '; list1+= ' <td width="4%" align="center"><img src="<%=request.getContextPath() %>/outer/search/news_gl_icon2.jpg" /></td> '; list1+= ' <td width="36%" colspan="2"> '; list1+= ' <a title="'+n.title+'" href="'+n.docpuburl+'" target="_blank">'+n.gcstitle +'</a> '; list1+= ' </td>'; //list1+= ' <td width="10%"><br>'; list1+= ' </td>'; list1+= '</tr> '; //alert(i+n); }); list1+= '</table>'; $("#bszn").html(list1); alert("互动知识库为您找到了有参考价值的内容,显示在网页下方,请查看!"); } }); }