javascript - ' + result[dateNow]?result[dateNow]:'无课'+ ''
PHP中文网
PHP中文网 2017-05-19 10:33:07
0
2
604

Can I write my ternary expression like this? It’s useless if I write it
result is the fetched data, I want to append this to html
I want to judge whether it is empty, for If empty, it will display "No Class"

PHP中文网
PHP中文网

认证高级PHP讲师

reply all (2)
某草草

If the content of result[dateNow] is empty, according to your expression, it will not die in the end. "No class" should return empty
Unless result[dateNow] returns undefined, your expression can display "No class" Bar

    世界只因有你

    Initially, there seems to be no problem. Please help to complete the code involved in the problem, thank you.

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!