#include <QAxObject>
#include <Windows.h>
int main(int argc, char *argv[])
{
//OleInitialize(0)
//CoInitialize(0)
QCoreApplication a(argc, argv)
QAxObject *asdfg = new QAxObject("Excel.Application")
return a.exec()
}
代码函数如下:foundTds = soup.findAll(name="td", attrs={"style":"text-align:right"}, text=re.compile("\d+(,\d+)*\.\d+"))
# !!! here match only the match re.compile text, not whole td tag
print "foundTds=",foundTds#foundTds= [u'', u'1,']
if(foundTds):
for eachMoney in foundTds:
print "eachMoney=",eachMoney
# eachMoney= 2
# eachMoney= 1
if __name__ == "__main__":
beautifulsoup_capture_money()
<script>$(document).ready(function(){
$("#test").before("<b>这是要添加的内容</b>")
})
</script>
这是jquery的做法,在id为test的前面插入内容,,,jquery自己引入