我试图在已经全屏模式下使用 javascript 重定向到新的 url,但重定向 currentlt 退出全屏模式,这是我不想要的。我使用了错误的 JS 代码吗?
window.location.href = demo_url;
Run Code Online (Sandbox Code Playgroud)
或者
window.location = demo_url;
Run Code Online (Sandbox Code Playgroud) 我有一个字符串:
this &foo and&foo but not &#bar haius&#bar
Run Code Online (Sandbox Code Playgroud)
所有"&foo"应该替换为"& foo",而"bar"应保持不变.即任何&未跟随#应该被替换.有任何想法吗?
我试过以下但是进展不顺利......
preg_replace('/&*$[#]*$/', '&', "this &foo and&foo but not &#bar haius&#bar");
Run Code Online (Sandbox Code Playgroud)
谢谢你的帮助!