<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("互动知识库为您找到了有参考价值的内容,显示在网页下方,请查看!");
}
});
}
分享到:
相关推荐
主要介绍了js与jquery实时监听输入框值的oninput与onpropertychange方法,实例分析了oninput与onpropertychange实现下拉框里自动匹配关键字实时监听文本框value值变化的功能,需要的朋友可以参考下
oninput,onpropertychange,onchange的用法和区别
js监听输入框值的即时变化onpropertychange、oninput.docx
js与jquery实时监听输入框值的oninput与onpropertychange方法.docx
onchange在用于文本框输入框时,有一个明显的不足....但是oninput有个诡异,必须用addEventListener的方式来绑定事件.否则无效. 好了, 以下是演示例子, 主流浏览器都没问题: on用onpropertychange,oni
整体思路是这样,当文本框的值改变时触发事件,对列表中原有的值进行过滤。 根据这个思路,首先需要解决的无非是确定文本框的...而对应的oninput则可以满足需求。 具体的实现是,文本框,隐藏按钮,当在文本框输入内
onpropertychange能够捕获每次输入值的变化。例如:对象的value值被改变时,onpropertychange能够捕获每次改变,而onchange需要执行某个事件才可以捕获。
还好有propertychange(IE)和oninput事件。 oninput是标准浏览器的事件,一般应用于input元素,当input的value发生变化时就会发生,无论是键盘输入还是鼠标粘贴的改变都能即时监听到。 浏览器兼容 IE9以下是不支持...
网上看到很方便实现这个功能的事件: IE 中的 onpropertychange 非IE中的 oninput 用这两事件的好处是,当在输入框的内容发生变化调用事件,使用key 和 mouse的相关事件会比较复杂,而且这个方法用粘贴方法一样有效...
NULL 博文链接:https://xuedong.iteye.com/blog/1144739
NULL 博文链接:https://hongan.iteye.com/blog/286251
要达到的效果 很多情况下我们都会即时监听输入框值的变化,以便作出即时动作去引导浏览者增强网站的用户体验感。比如即时显示输入框已经被输入的字节数,或者即时读取输入的... 了解这一点后我们发现onpropertychange的
让input框实现类似百度的搜索提示,oninput和onpropertychange事件监听,通过ajax获取json数据
当一个HTML元素的属性改变的时候,都能通过onpropertychange来捕获。例如< input name=”text1″ id=”text1″ />对象的value属性被页面的脚本修改的...firefox的事件oninput,效果和IE的onproperchange相同。