Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

how can i show ant text by onclick

<!DOCTYPE html>
<html>
<body>

<h2>Displaying text when clicked</h2>

<button type="button"
onclick="document.getElementById('demo').innerHTML = 'These are the steps to get your PIN number: Bla bla bla'">
PIN button:</button>

<p id="demo"></p>


</br></br></br>

<a onclick="showText('text1')" href="javascript:void(0);">PIN link:</a>

<script language="JavaScript">
   function showText(id)
    {
        document.getElementById(id).style.display = "block";
    }
</script>

<div id="text1" style="display:none;">These are the steps to get your PIN number: Bla bla bla</div>

</body>
</html> 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #show #ant #text #onclick
ADD COMMENT
Topic
Name
2+6 =