我正在尝试在表单的文本区域中设置默认消息...我希望在文本区域中以正确的方式设置型号名称及其链接...另外我不知道如何设置产品链接(其中位于 clean_uri 中)和 javascipt 变量中的断点...请帮助并建议我一个解决方案。
我想要的文本区域格式......
Hi, (Website name) has this item that I thought you would really like to know about.
Helena Runolfsdottir
Click on the link to see more
Link of Model
这是我在 JavaScript 变量中的 textarea 代码...
var content = "Hi, This website has item that I thought you would really like to know about.{{$cadmodel->name." "}}"+"Click on the link to see more info."+<a href=clean_uri>Click Here</a>;
最佳答案
@ma123456 - 使用
<div contenteditable="true" id="txtarea"> </div>
<script type="text/javascript">
var content = " Hi, (Website name) has this item that I thought you would really like to know about. <br/>\
Helena Runolfsdottir <br/>\
Click on the link to see more \
Link of Model\
<div contentEditable='false'> <a href='http://google.com'>Google</a> </div>";
$("#txtarea").html( content );
</script>
关于javascript - javascript 变量中的 html 中断和 href (Laravel 5.5),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46538825/