Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
HTML では、次のように object タグがあります。
<OBJECT ID="objectid" CLASSID="some-class-id" CODEBASE="some-codebase">
このオブジェクトにアクセスする関数を JavaScript で作成しました。
次のようにnull値を確認しました。
if(objectid==null){-----}
オブジェクトが未定義か空かを確認したい。それをチェックする機能はありますか?
To check if a variable contains a value and exists, use:
if (variable) {}
For example, to check that you have obtained the objectid DOM element:
objectid
if (document.getElementById("objectid")) {}