Home > Backend Development > PHP Tutorial > 如何在php中引用sweet alert

如何在php中引用sweet alert

WBOY
Release: 2016-06-23 13:40:05
Original
790 people have browsed it

找到一款漂亮的替代alert的插件sweet alert
http://tristanedwards.me/sweetalert/
但是我不知道在我的php文件中如何去正确引用他。
我的页面没有写入HTML标记,只有php文件。
需要在目前中间这行代码中将alert替换为sweetalert:
if($_POST['A']=="用户名" || $_POST['Ar]=="")
{

echo "<script>alert('请输入领用人');location.href='ldt.php'</script>";
        exit;
    } 


请教一下该如何操作


回复讨论(解决方案)


首先下载他的文件包放到你的网站,在php中同样echo引入代码,再把alert替换成sweetalert


首先下载他的文件包放到你的网站,在php中同样echo引入代码,再把alert替换成sweetalert



很奇怪,我试过了,不行耶
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template