2017-06-10 89 views
0

我想询问是否可以将多个双引号添加到输入值,就像这样:多双引号

<input value= "<iframe src="http://xxx.xx/embed?t=<?php the_title(); ?>" 
width='640' height='360' 
allowscriptaccess='always' allowfullscreen='true' 
scrolling='no' frameborder='0'></iframe>" 

所以,整个元素双引号内包裹着,就像src属性(URL)的值,但URL不会包含在值中。

这可以实现吗?

+1

[在PHP转义引号(可能的重复https://stackoverflow.com/questions/ 7999148/escape-quotation-marks-in-php) – ShiraNai7

+0

它不重复,我有html值不是php,它不适用于html –

+0

为什么你用[php]标记你的问题呢? – ShiraNai7

回答

1

您可以尝试使用转义反斜线双引号..... 欲了解更多信息请访问How to properly escape quotes inside html attributes?

<input value= "<iframe src=&quot;http://xxx.xx/embed?t=<?php the_title(); ?>&quot; 
width=&quot;640&quot; height=&quot;360&quot; 
allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; 
scrolling=&quot;no&quot; frameborder=&quot;0&quot;></iframe>"