How to handle getElementById return Null

后端 未结 4 1305
感动是毒
感动是毒 2021-01-27 13:22

On our web application there are many pages. Some of them contain element \"Ribbon.ListForm.Display.Manage.Workflows-Medium\" while some pages not.

I would like to use s

4条回答
  •  孤街浪徒
    2021-01-27 14:14

    You can check like this for null element:

    if (edit!=null && edit.value == '') 
    if (wf!=null && wf.value == '')
    if (checkout!=null && checkout.value == '')
    

提交回复
热议问题