add src attribute support

just another PR abort src, fix some bug in code style:)
还是有 space 和 tab 混杂...