要注意的当然是我等jquery菜鸟.$.text()获取的是所有匹配元素的text,要注意的是$.text(val)会把里面的所有东西都删了(包括里面的html标签)再设置text,相当于$.html(val)。官方的说法是“Set the text contents of all matched elements.Similar to html(), but escapes HTML (replace “<” and “>” with their HTML entities).”。
要注意的当然是我等jquery菜鸟.$.text()获取的是所有匹配元素的text,要注意的是$.text(val)会把里面的所有东西都删了(包括里面的html标签)再设置text,相当于$.html(val)。官方的说法是“Set the text contents of all matched elements.Similar to html(), but escapes HTML (replace “<” and “>” with their HTML entities).”。

2023-03-10
0万阅读

2023-02-27
0万阅读

2023-02-23
6万阅读

2023-02-22
6万阅读

2023-02-12
8万阅读

2023-02-12
3万阅读

2023-01-19
8万阅读

2023-01-17
4万阅读

2023-01-17
4万阅读

2023-01-17
2万阅读

2023-03-10
0万阅读

2023-02-27
0万阅读

2023-02-23
6万阅读

2023-02-22
6万阅读

2023-02-12
8万阅读

2023-02-12
3万阅读

2023-01-19
8万阅读

2023-01-17
4万阅读

2023-01-17
4万阅读

2023-01-17
2万阅读