Runoops Demo
runoops基础编程教程(runoops.com)
实例首页
自学教程
效率工具箱
源代码
外部库
0
重置
下载
上下布局
运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>runoops基础编程教程(runoops.com)</title> </head> <body> <p>单击按钮将段落中所有“Microsoft”替换成“runoops”:</p> <p id="demo">Visit Microsoft!Visit Microsoft!Visit Microsoft!</p> <button onclick="myFunction()">点我</button> <script> String.prototype.replaceAll = function(search, replacement) { var target = this; return target.replace(new RegExp(search, 'g'), replacement); }; function myFunction() { var str=document.getElementById("demo").innerHTML; var n=str.replaceAll("Microsoft","runoops"); document.getElementById("demo").innerHTML=n; } </script> </body> </html>
运行结果
刷新
放大
全屏
外部库
搜索并选择 CDN 库,将自动写入源代码(可再手动调整)
关闭
staticfileCDN
cloudflareCDN
添加