
前提
html本体で電卓を作っています。
の部分を別のjsファイルで記入しています。 しかし、Web上で電卓の数字を押すと機能しません。 ### 実現したいこと ボタンを機能させたい。<script>の部分を別のjsファイルで記入したい。 ### 試したこと onclickを消してみたり、buttonだけにしてみました。 ### 該当のソースコード(少し省略しました) meta http-equiv="Content-Type" content="text/html; charset=UTF-8" <button type="button" value="7"onclick="Nclick(this)" >7 <button type="button"value="8"button onclick="Nclick(this)" >8 <button type="button"value="9"button onclick="Nclick(this)" >9 <button type="button"value="("button onclick="Nclick(this)" >( <button type="button"value=")"button onclick="Nclick(this)" >) <br />・・・・ <button type="button" id="button" style="width:160px;">= <button type="button" onclick="formReset()" >c <script src="14.js">
0 コメント