jquery append 到容器的顶部能实现吗?

2025-02-25 21:28:58
推荐回答(2个)
回答1:

append只能在结尾插入。。。不能在开头

在开头插入,请用prepend
参考:
http://www.w3school.com.cn/tiy/t.asp?f=jquery_manipulation_prepend

回答2:

用prepend方法 prepend('张三')