获取文本信息的方法有很多,本例使用的使用的是jquery的text方法,这个方法想必大家都有使用过吧,简单实用。获取之后并使用alert将文本弹出,下面是实现代码
p { margin:8px; font-size:20px; color:blue; cursor:pointer; } b { text-decoration:underline; } button { cursor:pointer; } Show My Text

获取文本信息的方法有很多,本例使用的使用的是jquery的text方法,这个方法想必大家都有使用过吧,简单实用。获取之后并使用alert将文本弹出,下面是实现代码
p { margin:8px; font-size:20px; color:blue; cursor:pointer; } b { text-decoration:underline; } button { cursor:pointer; } Show My Text