click to show phonenumber on multiple hml files with multiple locations

click to show phonenumber on multiple hml files with multiple locations

I have 200 html files where I have to hide phone number until we click on a text, so I need to change all the files content using some tool like GrepWin. I can do that with this code but the problem is that the function name and id needs to be changed for all locations within the same page that have the same content. So this line is present several times on the same file:

I have 200 html files where I have to hide phone number until we click on a text, so I need to change all the files content using some tool like GrepWin. I can do that with this code but the problem is that the function name and id needs to be changed for all locations within the same page that have the same content. So this line is present several times on the same file:

 <p><b>Contact data: <script>function myFunction() {document.getElementById("demo").innerHTML = "0316 301 958";}</script><button id="demo" onclick="myFunction()">Show the number</button>
 <p><b>Contact data: <script>function myFunction() {document.getElementById("demo").innerHTML = "0316 301 958";}</script><button id="demo" onclick="myFunction()">Show the number</button>

I need different solution to change them all on all html files but to show the number(which is the same for all). At this point is only showing one number http://jsfiddle.net/qyzkfush/ . I can manually edit the function name and button id but it will take me ages to change 200 files content with many positions in each file. I need to use GrepWin to search the code and replace it for all files.

javascript html

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Know Everything About HTML With HTML Experts

HTML Assignment Help Australia @30% OFF from Sample Assignment, with Our Best HTML assignment help experts. Get HTML homework help online at affordable price. 100% Plag free assignment solution.

HTML JavaScript - Add Javascript File to HTML

Learn HTML and javascript, their uses & importance, html javascript function, javascript tags list, why add javascript file to html, HTML Events with JavaScript etc

Commonly Used HTML Tags with Examples

HTML tags are keywords used in HTML to display web-pages with certain properties. They are further used for defining HTML elements. An HTML element consists of a starting tag.

How to Create JavaScript carousel with HTML, CSS and JavaScript

Learn how to create JavaScript carousel with HTML, CSS and JavaScript. Learn how to create a JavaScript slider step by step. Now many people will just download a library to create a JavaScript carousel or JavaScript slider.

Countdown with HTML, CSS, and JavaScript / How to create JavaScript Countdown

Countdown with HTML, CSS, and JavaScript / How to create JavaScript Countdown. W will build a Responsive Website with HTML, CSS, and JavaScript