English 中文(简体)
php javascript 改为:
原标题:php javascript confirm box for delete

以下代码为购买力平价。

echo "<input type= submit  name= delete  value= $t2[0]  class= delete_button  onclick= return confirm( Please Confirm Delete ); >"

在用户点击删除纽顿时,我试图创建一个删除的纽子,它应当要求确认。 但在这种情况下,它没有工作。

is there any best way to delete with confirmation in php with/ or javascript and no ajax

最佳回答

你的引言正在打破;

onclick= return confirm( Please Confirm Delete ); >

相反使用;

onclick="return confirm( Please Confirm Delete );">
问题回答

顺便说一句:

<input type= submit  name= delete  value= $t2[0]  class= delete_button  onclick= return askme(); >

//javascript function
function askme() {
  if(confirm("Are you sure you want to delete this..?")) {
     //delete someting
  }
}

引言是错误的,而是使用:

 echo "<input type= submit  name= delete  value= $t2[0]  class= delete_button  onclick= return confirm("Please Confirm Delete"); >"

您将在<条码>中再次引用。

你们不能“召回”把《加拿大刑法》编为 j。 唯一可以做的是,向服务器机边PHP设计书发出一项要求,该要求书将考虑到你转至文字的各自参数,并产生(使用对应或打印)产出,这些产出将自动在请求中提供。

ery杂

$.post( url/to/script.php , {parameter1:  whatever , param2:  something }, function(response) {
   // the output of the PHP script is available in the variable "response"
   alert(response);
});

购买力平价的文字可以接管参数,与参数一起采取行动并产生产出。

$param1 = $_POST["parameter1"];
$param2 = $_POST["param2"];
// do whatever you want with $param1 and $param2
// create some output using echo/print
echo "This will be transferred back to the calling Javascript";

你们可以尝试,非常容易,而且能够发挥作用。

   <td> <a  onClick="return confirm( DELETE: Are You sure ?? );"  href="member_delete?id=<?php echo $row[ memID ];?>" >delete <i class="fa fa-trash-o" aria-hidden="true"></i></a></td> [DEMO][1]

我假定,它被列入成员名单。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签