点击警报时闯入内部
Break inside on click alert
我有一个按钮字段,在它被执行之前有一个警告。 "onclick" 警报代码包含一个文本。我无法在文本中刹车。我该如何解决?我找到了 [this question][1] 但我仍然无法解决它。问题是当我点击按钮时什么也没有发生。
echo "<tr><td><strong>
<form action='respondent.php' method='post'>
<input type='hidden' name='rid' value='".$row['rid']."'>
<input type='hidden' name='firstname' value='".$row['firstname']."'>
<a href='respondent.php'><button>".$row['firstname']." ".$row['lastname']."</button></a>
<input type='submit' name='submit' value='Select'>
</form>
</strong></td>
<td>".$row['email']."</td>
<td>".$row['pointsummary']."</td>
<td>".$row['datetime']."</td>
<td>
<input type='button' action='deleterespondent.php' value='Delete'
onclick="return confirm('Are you sure you \n want to delete?');">
</td>
</tr>";
这样使用\n
confirm('Are you sure you \n want to delete?');
\n 在字符串中使用,因此无需使用 'Are you sure you '\n' want to delete?'
删除single quotes
'周围\n
代码:
<input type='button' action='deleterespondent.php' value='Delete'
onclick=\"return confirm('Are you sure you \n want to delete?');\">
输出
我有一个按钮字段,在它被执行之前有一个警告。 "onclick" 警报代码包含一个文本。我无法在文本中刹车。我该如何解决?我找到了 [this question][1] 但我仍然无法解决它。问题是当我点击按钮时什么也没有发生。
echo "<tr><td><strong>
<form action='respondent.php' method='post'>
<input type='hidden' name='rid' value='".$row['rid']."'>
<input type='hidden' name='firstname' value='".$row['firstname']."'>
<a href='respondent.php'><button>".$row['firstname']." ".$row['lastname']."</button></a>
<input type='submit' name='submit' value='Select'>
</form>
</strong></td>
<td>".$row['email']."</td>
<td>".$row['pointsummary']."</td>
<td>".$row['datetime']."</td>
<td>
<input type='button' action='deleterespondent.php' value='Delete'
onclick="return confirm('Are you sure you \n want to delete?');">
</td>
</tr>";
这样使用\n
confirm('Are you sure you \n want to delete?');
\n 在字符串中使用,因此无需使用 'Are you sure you '\n' want to delete?'
删除single quotes
'周围\n
代码:
<input type='button' action='deleterespondent.php' value='Delete'
onclick=\"return confirm('Are you sure you \n want to delete?');\">
输出