How to edit an html file using another html file [closed]

I have two html files, index.html and f.html

f.html

<body>
   <script src="a.js"></script>
</body>

I want to change the src of f.html‘s script tag from a.js to b.jsusing index.html

How can I do that?