Can I pop up alert in javascript using php

前端 未结 1 521
攒了一身酷
攒了一身酷 2021-01-29 08:36

I want to trigger javascript alert using PHP. Is it possible

I want to use it in head section, for displaying it at load time.


    

        
1条回答
  •  萌比男神i
    2021-01-29 09:25

    Of course this is possible.

    All you are doing is outputting JavaScript, it's all the same thing.

    The only issue is that you are nesting

    By the way, as i'm sure you already know, this specific code will ALWAYS echo the "alert('Hi');"

    0 讨论(0)
提交回复
热议问题