需要从http://sitename.com/cat/index.php重定向到http://sitename.com/cat/index.php#anchor
我尝试了两种方法:php重定向和元刷新
PHP重定向
<?php
$URL = "http://sitename.com/cat/index.php#anchor";
header("Location: $URL");
?>
<html>
....
Run Code Online (Sandbox Code Playgroud)
元刷新
<html>
<head>
...
<meta http-equiv="refresh" content="0;url=http://sitename.ru/cat/index.php#anchor">
...
</head>
...
</html>
Run Code Online (Sandbox Code Playgroud)
结果两种方式我都有自行车页面刷新.
如何正确解决这个问题?
需要谷歌脚本的帮助.我有多行电子表格.
需要一个执行以下操作的脚本:
如果列G中的任何单元格已更改,则使用此行中的信息向自定义地址发送电子邮件通知:来自单元格D的信息和单元格G的新值.
UPD
我找到了有用的信息:
function emailNotification() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getActiveSheet();
var cell = ss.getActiveCell().getA1Notation();
var cellvalue = ss.getActiveCell().getValue().toString();
var recipient = "me@gmail.com";
var subject = 'Update to '+sheet.getName();
var body = sheet.getName() + ' has been updated. Visit ' + ss.getUrl() + ' to view the changes on cell: «' + cell + '» New cell value: «' + cellvalue + '»';
MailApp.sendEmail(recipient, subject, body);
};
Run Code Online (Sandbox Code Playgroud)
此脚本跟踪整个表中的更改.我想仅跟踪G列中的更改,并从列D获取值.
题:
当值更改了G列中的单元格时,如何获取D列中单元格的值
最后的脚本 - 回答我的问题 …