我试图在PHP中使用这个模式:
1 2 3 4
8 7 6 5
9 10 11 12
Run Code Online (Sandbox Code Playgroud)
我尝试了这个,但没有成功:
$num = 0;
for ($i=0; $i<=2; $i++) {
for ($j=1; $j<=5; $j++) {
$num = $j - $i+$num;
echo $num."";
$num--;
}
echo "</br>";
}
Run Code Online (Sandbox Code Playgroud)
有人可以帮我吗?
提前致谢...
警告是:
jquery-1.9.1.js:8526跨域读取阻止(CORB)使用MIME类型application / json 阻止了跨域响应https://www.metaweather.com/api/location/search/?query=lo。有关更多详细信息,请参见https://www.chromestatus.com/feature/5629709824032768。
我的代码是:
<!DOCTYPE html>
<html>
<head>
<title> Search API </title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
</script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js">
</script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="container">
<h2>API Search Whether</h2>
<div class="row">
<div class="col-md-6">
<input type="text" name="name" id="name" class="form-control">
</div>
<div class="col-md-2">
<button type="button" id="search" class="btn btn-primary btn-lg">Search</button>
</div>
</div>
<br><br><br><br>
<div class="row">
<table class="table" border="2px">
<thead>
<tr style="color:blue; font-weight:bold;">
<td >Domain</td>
<td>Suffix</td>
<td>Expiry Date</td>
<td>Created At</td>
<td>Country</td>
</tr>
</thead>
<tbody id="tbody">
</tbody> …
Run Code Online (Sandbox Code Playgroud)