add src attribute support

just another PR abort src, fix some bug in code style:)
orz....