Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jquery mobile上的确认弹出窗口_Jquery_Jquery Mobile - Fatal编程技术网

jquery mobile上的确认弹出窗口

jquery mobile上的确认弹出窗口,jquery,jquery-mobile,Jquery,Jquery Mobile,我有一个delete链接,onclick调用js函数,这个函数通过delete操作进一步处理。 我想实现确认对话框窗口,其中弹出删除链接和进程的js功能上确定确认 这是jquery移动web应用程序 我想最简单的方法是: <a onclick="if (confirm('Delete record?')) DeleteRecord(@rec.ID);" data-role="button" data-icon="delete" data-mini="true"> 但是,将jav

我有一个delete链接,onclick调用js函数,这个函数通过delete操作进一步处理。 我想实现确认对话框窗口,其中弹出删除链接和进程的js功能上确定确认

这是jquery移动web应用程序


我想最简单的方法是:

<a onclick="if (confirm('Delete record?')) DeleteRecord(@rec.ID);" data-role="button" data-icon="delete" data-mini="true">

但是,将javascript与标记分离会更干净

<a onclick="if (confirm('Delete record?')) DeleteRecord(@rec.ID);" data-role="button" data-icon="delete" data-mini="true">