Issue: To add the same style button after the previous button, through $ ("#cj"). html (str); This form is added, but cannot be added to the style
<DivID= "BTN"class= "BTN"> <spanID= "Xiugai"><aID= "Btnedit"href= "javascript:void (0);"class= "Easyui-linkbutton"style= "padding:0 30px;text-align:center "onclick= "Btnedit ()">Modify</a></span> <spanID= "CJ"></span> </Div>
<script type= "Text/javascript" > $ (function() { var str= ' <a ID = "BTNCJ" href= "javascript:void (0);" class= "Easyui-linkbutton" style= "padding:0 30px;text-align:center "onclick=" Btnedit () "> Create </a>"; $ ("#cj"). html (str); </script>
Solution: Add: $.parser.parse ("#cj"); Render Local! Only success!
<script type= "Text/javascript" > $ (function() { var str= ' <a ID = "BTNCJ" href= "javascript:void (0);" class= "Easyui-linkbutton" style= "padding:0 30px;text-align:center "onclick=" Btnedit () "> Create </a>"; $ ("#cj"). html (str); $.parser.parse ("#cj"); </script>
After the successful:
The problem of Easyui js splicing html,class attribute invalidation