我想要的是:
JsFunction("argument1","argument2","argument3")
我得到了什么:
JsFunction('argument1','argument2','argument3')
现在我的刀片格式代码是:
<a href="#" onclick="displayBannerInvoice('{{$bannerProperty->property_ID}}','{{ $bannerProperty->ID }}','{{$bannerProperty->end_date}}','{{$bannerProperty->no_of_days}}','{{$bannerProperty->total}}','{{$bannerProperty->vat_percentage}}')"></a>解决方法 最好的镜头是不重新发明轮子并尝试搜索:)
github https://github.com/laracasts/PHP-Vars-To-Js-Transformer上已有一个软件包
它完全符合你的要求.它适用于Laravel 5和Laravel 4.
总结以上是内存溢出为你收集整理的如何从刀片格式html将PHP变量传递给javascript函数全部内容,希望文章能够帮你解决如何从刀片格式html将PHP变量传递给javascript函数所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)