按照WordPress支持网站上的说明,我已经将WordPress移到了它自己的目录中。
我的工作正常,但网址现在可以显示,http://www.example.com/subfolder/但是我希望它不显示/subfolder/
我似乎无法通过htaccess删除 /subfolder/
这是我当前的htaccess代码
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$
RewriteRule ^(/)?$ subfolder [L]
Run Code Online (Sandbox Code Playgroud) 我有一个表,需要为其分配编号规则,然后根据另一列中的值再次将编号规则重新启动为 1。
这是我的桌子:
| 日期 | 姓名 | 指标 |
|---|---|---|
| 2022年1月12日 | 测试1 | 1 |
| 2022年2月12日 | 测试2 | 无效的 |
| 2022年3月12日 | 测试3 | 无效的 |
| 2022年4月12日 | 测试4 | 无效的 |
| 2022年5月12日 | 测试5 | 1 |
| 2022年6月12日 | 测试6 | 无效的 |
| 2022年7月12日 | 测试7 | 1 |
| 2022年8月12日 | 测试8 | 无效的 |
我需要的是在末尾添加一个“实例”列,该列只是继续数字序列,直到再次遇到“指示器”列中带有 1 的行,然后重置。
所以我想要的结果是:
| 日期 | 姓名 | 指标 | 实例 |
|---|---|---|---|
| 2022年1月12日 | 测试1 | 1 | 1 |
| 2022年2月12日 | 测试2 | 无效的 | 2 |
| 2022年3月12日 | 测试3 | 无效的 | 3 |
| 2022年4月12日 | 测试4 | 无效的 | 4 |
| 2022年5月12日 | 测试5 | 1 | 1 |
| 2022年6月12日 | 测试6 | 无效的 | 2 |
| 2022年7月12日 | 测试7 | 1 | 1 |
| 2022年8月12日 | 测试8 | 无效的 | 2 |
我试过玩DENSE_RANK() over (Order by Date)
但我明白最终会这样:
| 日期 | 姓名 | 指标 … |
|---|
我是 JS 的新手,虽然我买了一些书来开始正确学习,但我想知道是否有人可以提供建议?我的商店列出了许多产品。在商店页面上,我在每个项目的底部添加了一个按钮,并希望在单击按钮时执行操作。我已经应用了这段代码,它可以工作,但只能在第一个元素上 - 因为它基于 id:
HTML:
<button id="myBtn" class="openmodal">Open Modal</button>
<!-- The Modal -->
<div id="myModal" class="modal">
<!-- Modal content -->
<div class="modal-content">
<span class="close">×</span>
<p>Some text in the Modal..</p>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
JS:
// Get the modal
window.onload = function(){
var modal = document.getElementById('myModal');
// Get the button that opens the modal
var btn = document.getElementById("myBtn");
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks on the button, open the …Run Code Online (Sandbox Code Playgroud)