我正在尝试使用jQuery (v1.2.6)在代码块周围封装一个锚标记,方法是执行以下操作:
var link = $('<a>').attr('href','http://www.foo.bar');我从其他案例中知道,当你通过JavaScript插入代码时,IE是非常挑剔的,但在这种情况下,我只是不知道这个简单的锚元素会出什么问题?有谁有主意吗?顺便说一句:我已经尝试通过$('<a></a>')生成锚,不幸的是
import xml.etree.ElementTree as ET
fileXml ='C:\\Users\\Documents\\config.xml' root = tree.getroot() root.insert(1, comment) # 1 is the index where comment is inserted
tree.write(fi