简体   繁体   English

如何在apache cordova中使用sweetalert?

[英]How to use sweetalert in apache cordova?

I am working in a cordova application. 我正在使用cordova应用程序。 I want to know how to include sweetalert in cordova. 我想知道如何在cordova中加入sweetalert。

Note: I don't use any framework like angular, react, framework7. 注意:我不使用任何框架,如angular,react,framework7。 I use Javascript and Ajax in my cordova application 我在我的cordova应用程序中使用Javascript和Ajax

add this in your HTML header (or download file localy and insert it the same way) 在HTML标题中添加此项(或以localy方式下载文件并以相同方式插入)

<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>

And use swal() function to display alert 并使用swal()函数显示警报

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM