easyui动态添加组件没有样式
2015-12-04 14:38
417 查看
做项目时动态添加组件是常有的事,easyui动态添加组件时样式会失效,这是因为这个组件没有经过
easyui的解析器解析, 比如:
这个时间添加的只是正常的a标签,需要用easyui的解析器解析之后才是easyui的组件
easyui的解析器解析, 比如:
<pre name="code" class="javascript">var newElement = '<a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'">easyui</a>'; $(newElement).appendTo("#container");
这个时间添加的只是正常的a标签,需要用easyui的解析器解析之后才是easyui的组件
var newElement = '<a id="btn" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'">easyui</a>'; $(newElement).appendTo("#container"); $.parser.parse(newElement);
相关文章推荐
- poj 1679 The Unique MST
- 滚动指定UITableViewCell到顶部
- Build Settings中的变量@rpath,@loader_path,@executable_path
- UI视图控件、视图嵌套、SubView、Tag 的使用
- Android UICC 实现框架和数据读写
- LeetCode(304)Range Sum Query 2D - Immutable
- LeetCode(304)Range Sum Query 2D - Immutable
- easyui-slider
- IOS 高斯模糊 (毛玻璃效果 UIVisualEffect)
- String的substring和subSequence的区别
- 关于uitableview上面的一块空白的问题
- django的request对象和response对象
- easyui--datetiembox日期组件
- iOS开发-UI控件:关于使用UISearchDisplayController
- [APUE]再读之 标准IO库
- easyui--timespinner时间微调组件
- 解决Value '0000-00-00 ' can not be represented as java.sql.Timest
- easyui--spinner
- spoj375 Query on a tree(树链剖分 边权 入门题)
- [MSSQL]在T-SQL语句中访问远程数据库(openrowset/opendatasource/openquery)