繁体   English   中英

如何在HTML5上的双引号内插入双引号

[英]how to insert doublequote inside doublequote on HTML5

我尝试将PHP函数调用为HTML 5按钮,当我单击按钮时,它不起作用。 这是第一个代码:

<button id="Location" type="button" value="LOCATION" formmethod="GET" formaction="<?PHP include'./Function/DisplayFunction/TableViewer.php'; Table("Location");?>" onclick="">LOCATION</button>

在我尝试了这个之后:

<button id="Location" type="button" value="LOCATION" formmethod="GET" formaction="<?PHP include'./Function/DisplayFunction/TableViewer.php'; Table(/"Location/");?>" onclick="">LOCATION</button>

和这个:

<button id="Location" type="button" value="LOCATION" formmethod="GET" formaction="<?PHP include'./Function/DisplayFunction/TableViewer.php'; Table(%84Location%84);?>" onclick="">LOCATION</button>

使用反斜杠: \\代替: /

包括将要粘贴的php文件的所有内容到formaction属性中,当然这不是您想要的,请尝试:

<?php
include('./Function/DisplayFuncrion/TableViewer.php');
echo '<button id="Location" type="button" value="LOCATION" formmethod="GET" formaction="'.Table("Location").'" onclick="">LOCATION</button>';
?>

那里不需要使用双引号。

尝试这个

<button id="Location" type="button" value="LOCATION" formmethod="GET" formaction="<?PHP include('./Function/DisplayFunction/TableViewer.php'); Table('Location%'); ?>" onclick="">LOCATION</button>

暂无
暂无

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

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