我如何调用计算器在我的网站上用Javascript函数单击弹出窗口?

我如何调用计算器在我的网站上用Javascript函数单击弹出窗口?,javascript,php,css,function,Javascript,Php,Css,Function,我的索引(PHP) 在上,我需要我的onclick <html> <head> <script src="script.js"></script> <link rel="stylesheet" href="styles.css"> </head> <body> <div class="form"

我的索引(PHP)
上,我需要我的onclick

<html>
<head>
    <script src="script.js"></script>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
        
<div class="form">
<input type="number">

    <div class="button"> **Here I need the onclick popup call calculator**
    
       <img src="https://www.iconarchive.com/download/i58919/wwalczyszyn/android-style-honeycomb/Calculator.ico"></img>
    </div>
</div>

</body>
</html>

**这里我需要onclick弹出调用计算器**

我的计算器是一个名为Calculator.php的php文件,后跟Calculator.cssscript.js

将Calculator.php包含在index.php中并仅显示/隐藏“计算器”并不容易元素?我想把这个按钮放在一个函数中,并在我的网站上多次调用它。没问题,计算器可能是
的子元素,任何按钮都会打开同一个计算器。实际上,我希望一个函数在单击一个按钮后就可以运行。把它想象成一个插件,无论我在哪里放置按钮(带有函数();),当你按下按钮时,计算器弹出窗口。我明白了,我的意思是你不需要在点击时加载计算器。它可以在页面中完全隐藏(
display:none
),并在用户单击按钮时显示。您的函数将执行类似于
document.getElementById('calculator').style.display='block'