我想使用 Laravel 框架和共享主机每分钟向我的用户发送通知,在我的主机中无法访问 ssh 访问,我对我的英语感到非常抱歉
我的命令
namespace App\Console\Commands;
use App\Classes\NotificationClass;
use Illuminate\Console\Command;
class Checkreserve extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'check:reserve';
/**
* The console command description.
*
* @var string
*/
protected $description = 'send notification to all user';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
* …Run Code Online (Sandbox Code Playgroud) 如果有人可以帮助我,因为我不知道为什么控制台中总是有 NaN。一切似乎都没问题。代码应该获取输入的值并进行简单的计算。不幸的是,我收到了 NaN,所以我决定使用 console.log 来探索值,它向我解释了每个输入的值都是 NaN。我认为这个解决方案是显而易见的,但我是新手,我一直在想 2 个小时我的错误是什么。
<div id="wrapper">
<section>
<h2>Give width of tile</h2>
<input id =width type="number"/>
<h2>Give height of tile</h2>
<input id =height type="number"/>
<h2>Price of one tile</h2>
<input id =price type="number"/>
</section>
<section>
<h2>Surface</h2>
<input id = "surface" type="number"/>
<button id="calculate">Calculate</button>
</section>
<section>
<p>The price is:</p>
<div id="result">
</div>
</section>
</div>
<script src="main.js"></script>
Run Code Online (Sandbox Code Playgroud)
JS
document.addEventListener("DOMContentLoaded", function(event) {
var width = parseInt(document.getElementById("width").value);
var height = parseFloat(document.getElementById("height").value);
var price= parseFloat(document.getElementById("price").value);
var surface= parseFloat(document.getElementById("surface").value);
var calculate= document.getElementById("calculate");
var result= …Run Code Online (Sandbox Code Playgroud)