<button id="clab" type="button" onclick="myFunction(this)">关注</button>
<script>
function myFunction(dom) {
var str = dom.innerHTML =="已关注"? "关注":"已关注";
dom.innerHTML =str;
}
</script>
<button id="clab" type="button" onclick="myFunction(this)">关注</button>
<script>
function myFunction(dom) {
var str = dom.innerHTML =="已关注"? "关注":"已关注";
dom.innerHTML =str;
}
</script>