小编Ren*_*r22的帖子

使用jquery在url中删除一个参数名称和值

现有网址

http://example.com/home.php?id=1&branch_id=4&course_id=5
Run Code Online (Sandbox Code Playgroud)

新网址

http://example.com/home.php?id=1&branch_id=4
Run Code Online (Sandbox Code Playgroud)

从现有网址中删除course_id

如何从url中删除一个参数值.

尝试下面的代码:

function replaceUrlParam(url, paramName, paramValue){
    var pattern = new RegExp('(\\?|\\&)('+paramName+'=).*?(&|$)')
    var newUrl=url
    if(url.search(pattern)>=0){
        newUrl = url.replace(pattern,'$1$2' + paramValue + '$3');
    }
    else{
        newUrl = newUrl + (newUrl.indexOf('?')>0 ? '&' : '?') + paramName + '=' + paramValue
    }
    return newUrl
}
Run Code Online (Sandbox Code Playgroud)

但它不起作用......

javascript jquery

2
推荐指数
1
解决办法
1994
查看次数

无法使用 Google Cloud Platform 中的电子邮件功能发送电子邮件

我们有带有我们域名的 G Suite 帐户。我们的服务器是谷歌云平台。我们正在使用 PHP 进行开发,我们尝试了不同的代码来发送邮件,但无法使用邮件功能接收任何邮件,我们联系了 G Suite 帐户,他们说所有设置都运行良好......这个问题是关于谷歌云平台的,云拒绝邮件。

是否需要在 Google Cloud Platform 上实施任何其他设置以建立与 G Suite 帐户的连接?

我们是否应该拥有一个 App Engine 帐户来通过代码发送电子邮件?

关于这里可能发生什么或接下来要测试什么的任何想法?

email google-app-engine google-compute-engine google-cloud-platform

1
推荐指数
1
解决办法
2万
查看次数