我需要的总数sunday's和saturday's一个月。使用moment.js库。谁能帮我。谢谢
我有一个控制器VendorController.并且查看文件是index.html.erb
我想通过onclick函数传递供应商的ID.这是我的代码
代码下 vendors_controller.rb
def index
@vendor = Vendor.all
end
Run Code Online (Sandbox Code Playgroud)
代码 index.html.erb
<script language="javascript" type="text/javascript">
function func1(id) {
alert(_id);
}
function func2(id) {
alert(id);
}
</script>
<% @vendors.each do |vendor| %>
<tr>
<td><%=link_to vendor.name , '#', onclick: "func1(1)", remote: true %></td>
<td><%= link_to vendor.id, '#', :onclick => 'func2(vendor.id)' %></td>
</tr>
<% end %>
Run Code Online (Sandbox Code Playgroud)
因为func1()我得到警报.但是因为func2我没有得到任何回应.请帮助..提前谢谢你.
刷新页面后,我想要运行几行代码.
function showServicesList(){
location.reload();
/*
* Statement1
* Statement2
* Statement3
* Statement4
*/
}
Run Code Online (Sandbox Code Playgroud)
但页面很新鲜,但以下代码没有运行..任何帮助..
我已经开始学习 Laravel 5。遵循本教程。我收到这个错误。( Class 'App\Http\Controllers\Url' not found)。
我在这里附上了我的代码的图像。

Whoops, looks like something went wrong.
1/1
FatalErrorException in UrlController.php line 22:
Class 'App\Http\Controllers\Url' not found
in UrlController.php line 22
at FatalErrorException->__construct() in compiled.php line 1838
at HandleExceptions->fatalExceptionFromError() in compiled.php line 1833
at HandleExceptions->handleShutdown() in compiled.php line 0
at UrlController->store() in compiled.php line 8504
at call_user_func_array:{C:\wamp\www\readit-later\vendor\compiled.php:8504}() in compiled.php line 8504
at Controller->callAction() in compiled.php line 8572
at ControllerDispatcher->call() in compiled.php line 8551
at ControllerDispatcher->Illuminate\Routing\{closure}() in compiled.php line 9190
Run Code Online (Sandbox Code Playgroud)
帮帮我。