【发布时间】:2016-08-03 22:32:04
【问题描述】:
我有一个网页,其中有多个用户信息详细信息。所以当我点击完成(这里完成按钮在每个用户详细信息旁边)按钮时,它应该执行一些任务(例如,我在这里发送邮件)和在我再次重定向到同一页面后禁用该按钮。 我该怎么做? 有什么可能的建议吗?
[这是一个刀片模板,因为我正在制作 laravel Web 应用程序]
我的网页演示:
<html>
<head>
<title> User Details </title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
</head>
<body>
<div class="container">
<h3> Student Details </h3>
<table class="table table-striped table-bordered" id="example">
<thead>
<tr>
<td>Serial No</td>
<td>Student Name</td>
<td>Stdunet Email</td>
<td>Course Name</td>
<td>Phone Number</td>
<td>Action</td>
</tr>
</thead>
<tbody>
<?php $i=1; ?>
@foreach($user as $row)
@if($row->courses()->first())
<tr>
<td>{{$i}}</td>
<td>{{$row->name }}</td>
<td>{{$row->email}}</td>
<td>{{$row->courses()->first()->name}} </td>
<td>{{$row->phone}}</td>
<td>
<a href="{{route('sendMail',$row->id)}}" class="btn btn-warning">Complete</a>
</td>
</tr>
<?php $i++; ?>
@endif
@endforeach
</tbody>
</table>
</div>
</body>
</html>
【问题讨论】:
标签: javascript jquery laravel laravel-5.2 laravel-blade