您的位置:首页 > 其它

epoll事件处理机制详解

2012-10-11 14:49 351 查看
使用JqueryEasyUI的时候,我们从后台传过来easyui的元素无法正常显示。

在开发的时候我们会遇到这样一个问题。

//点击页面 添加事件

//得到选课组的信息

function getClozeGroupInfo() {
var clozegroup_id = $('#clozegroup').val();
$.post('/index.php/ajax/getClozeExperiment',{id: clozegroup_id},function(data){
$('#experimentList').html(data);

});

}

我们会使用$.post来获取我们需要的内容。

但是如果我获取的页面中存在Jquery easyUI的东西,那么获取过来的元素是无法被解析的。

比如

<input id="room2" url="/index.php/ajax/getRoomList" valueField="id" textField="name" class="easyui-combobox" multiple="true" name="room" style="width:100px" required="true">


在获取到的这个input里面,有class="easyui-combobox"。

那么直接获取过来是无法使用的。

这种情况下,我们需要对获取过来的html元素进行重绘。

function getClozeGroupInfo() {
var clozegroup_id = $('#clozegroup').val();
$.post('/index.php/ajax/getClozeExperiment',{id: clozegroup_id},function(data){
$('#experimentList').html(data);
$.parser.parse($('#experimentList'));
});

}


[/code]
这样,页面中的jquery元素就能够正常了。
本文出自 “难道是神仙” 博客,请务必保留此出处http://leexiaobo.blog.51cto.com/2851883/928726
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: