不用这么复杂, input有title属性<input type="text" title="库存:10" >