jQuery-替换href =“&"的内容和 '#'

问题描述:

我需要一种使用jQuery替换<a href="this text"中包含的文本的方法,我想替换'#'引号中包含的文本.

I need a way of replacing the text contained within <a href="this text" using jQuery, I want to replace what ever text is held within quotes to a '#'.

有什么建议吗?

$('a').attr('href', '#');