当点击它时,如何将此按钮问号更改为常规文本问号?
<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="About Company">?</button>
这是我想要实现的图片!
答案 0 :(得分:0)
<body>
<div id="myDiv">
<input type="button" value="?" id="submit" onClick="change()"> <!--button input that will trigger an event named change-->
</div>
</body>
<script type="text/javascript">
function change(){ //function to run when you click on the button...
var valueOfButton = document.getElementById("submit").value;
//create a variable with the value of the submit button
document.getElementById("myDiv").innerHTML = valueOfButton;
// Here we are changing the value of myDiv. Replace the button with plain text.
}
</script>
&#13;
你想怎么做到这一点? 你尝试了什么? 我只有一个简单的解决方案。