【发布时间】:2015-09-06 09:36:50
【问题描述】:
我正在尝试使用 laravel 的表单帮助程序添加输入字段,当我点击一个元素时,我正在这样做
$('#segment-create').click(function(e){
$('#segments').append("<div class='clearfix'> <div class='selectbox boxed pull-left'> {{ Form::selectopt('contact_property[]', [ 'class' => 'form-control pull-left', 'rel' => 'noresize' ], [ 'User Activity' => [ 'Clicked in the last' => 'clicked_last', 'Opened in the last' => 'opened_last', 'Not clicked in the last' => 'not_clicked_last', 'Not opened in the last' => 'not_opened_last' ], 'User Property' => [ 'City' => 'city', 'Age' => 'opened_last', 'Name' => 'name' ] ] ) }} <span class='pull-left' style=' width:50px; text-align:center; line-height:34px;'>is</span> <div class='selectbox boxed pull-left'> {{ Form::select('operator[]', array('0' => '=', '1' => '>', '2' => '≥', '3' => '<', '4' => '≤', '5' => '<>' ), null, ['class' => 'operator form-control pull-left']); }} <span class='pull-left' style=' width:50px; text-align:center; line-height:35px;'>to</span> <div class='pull-left'> {{ Form::text('value[]', null, ['class' => 'filter-name form-control', 'placeholder' => 'Filter value']) }} </div> <div class='pull-left'><a href='#' class='right cbx-filter cbx cbx-checked filter-checkbox'> </a> </div> </div> </div> </div>");
e.preventDefault();
// to check as complete todo list
shoot({segment_name:$('#new-segment-name').val()}, 'POST');
});
我不确定我在这里做错了什么,但我在 firebug 控制台中收到此错误
【问题讨论】:
标签: javascript php jquery laravel-4