我有一件奇怪的事情。 我在 mysql View 列中定义了链接。
CONCAT(
'<a href=\'infoloan/',
sms.loan_id,
'\'>#</a>') AS `linkToLoan`
这是因为 < 在 json 响应中被解析为 <
和 > 为 >
。
可以说:
"<a href='infoloan/22380'>#</a>"
如何使网页正确显示。
最佳答案
如果您可以在 JSON 解析器之前控制数据,那么我会使用 html_entity_decode()
对其进行解码
关于HTML 表格将值 < 和 > 显示为文本 < >,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49161326/