Conditional Formatting in HTML Tags

前端 未结 7 1314
挽巷
挽巷 2020-12-31 12:23

Is there any option for using IF-ELSE conditioning in HTML tags

   do something     
      do something            


        
7条回答
  •  忘掉有多难
    2020-12-31 13:13

    As has been said in other posts, HTML does not support conditional logic. You have two choices here:

    1) Generate the HTML dynamically using technologies such as PHP or XSLT

    2) Modify the HTML DOM after the fact using Javascript

提交回复
热议问题