When creating the page scripts within UI builder, servicenow doesn't allow you to use Web API (except console and timeout), hence you are not able to access document or window objects. One neat trick ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する