LoginSignup
fina_intel
@fina_intel (fina Intel)

Are you sure you want to delete the question?

If your question is resolved, you may close it.

Leaving a resolved question undeleted may help others!

We hope you find it useful!

JavaScriptでエラーが出ていないのに実行されない

解決したいこと

javaScriptで書いたプログラムがうまく実行されない
例)
JavaScriptでhtml(inputタグ内)に文字列を表示したいのですが上手く実行されません。
解決方法教えて下さい。
エラーメッセージは出ていません。

該当するソースコード

window.OnLoad = function OnLoad(){
  grades = document.getElementsById('result');
  grades.innerHTML = "test";
};

自分で試したこと

inputタグにはid='result'を付与しました。

0

1Answer

Comments

  1. @fina_intel

    Questioner
    ご解答ありがとうございます。
    inputタグではなpタグにしたら上手く実行されました。

Your answer might help someone💌