<!doctype html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>01 exam</title>
<link rel="stylesheet" type="text/css" href="01 exam.css">
</head>
<body> <h2>JavaScript String Methods</h2> <p>Replace "Microsoft" with "W3Schools" in the paragraph below:</p> <button onclick="myFunction()">Try it</button> <p id="demo">paul,paula,pauline,panl,paul</p> <script>
function myFunction() {
var str = document.getElementById("demo").innerHTML;
var txt = str.replace(/\bpaul\b/g,"Ringo");
document.getElementById("demo").innerHTML = txt;
}
</script>
</body>
</html>

string method and regular expresions的更多相关文章

  1. [Javascript] String method: endsWith() && startsWith()

    With endsWith && startsWith, you can easily find out whether the string ends or starts with ...

  2. LINQ to Entities does not recognize the method 'Int32 ToInt32(System.String)' method, and this method cannot be translated into a store expression

    if (!string.IsNullOrEmpty(FarmWorkId)) { data = data.Where(p => p.TypeId == Convert.ToInt32(FarmW ...

  3. LINQ to Entities does not recognize the method 'System.DateTime ToDateTime(System.String)' method

    System.Data.Objects.EntityFunctions和System.Data.Objects.SqlClient.SqlFunctions中的方法进行比较,如下 where Syst ...

  4. String Method的字符串变换的一个例子

    <!DOCTYPE html> <html lang="en"><head> <meta charset="UTF-8" ...

  5. python string method

    嗯,学习其它语言没这样全练过,嘻嘻 //test.py 1 # -*- coding: UTF-8 -*- 2 3 str = "i am worker" 4 print str. ...

  6. AttributeCollection.Add(String, String) Method

    <%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Trans ...

  7. string method 字符串常用方法讲解

    st = 'hello ketty ##$ \*'print(st.count('t'))# 输出‘t’的个数print(st.capitalize()) #Hello ketty 将首字母大写pri ...

  8. String.Join Method

    Overloads Join(String, String[], Int32, Int32) Concatenates the specified elements of a string array ...

  9. Regular Expressions --正则表达式官方教程

    http://docs.oracle.com/javase/tutorial/essential/regex/index.html This lesson explains how to use th ...

随机推荐

  1. Java利用POI读取Excel

    官网直接下载POI  http://poi.apache.org/ package com.CommonUtil; import java.io.File; import java.io.FileIn ...

  2. Just Oj 2017C语言程序设计竞赛高级组D: 字符串最大表示(next数组)

    D: 字符串最大表示 时间限制: 1 s      内存限制: 128 MB 题目描述 有如下定义,abcnabcn表示字符串abc重复n次,例如abc2abc2表示abcabc. 给定一个字符串,求 ...

  3. JQuery之左侧菜单

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  4. zjoi[ZJOI2018]胖

    题解: 因为n,m很大 所以复杂度应该是和m相关的 考虑到每个点的影响区间是连续的 就很简单了 区间查询最小值线段树维护(st表也可以) 然后注意一下不要重复算一个就可以了 max函数用templat ...

  5. alpha冲刺8/10

    目录 摘要 团队部分 个人部分 摘要 队名:小白吃 组长博客:hjj 作业博客:冲刺倒计时之8 团队部分 后敬甲(组长) 过去两天完成了哪些任务 首页重新设计 课程时间线确定 答辩准备 接下来的计划 ...

  6. zabbix http服务监控实例

    1在被监控主机安装http服务 ,监听80端口 systemctl start httpd.service       启动服务  80端口已经启动 设定,监控80端口,当服务不当时先自动重启服务 2 ...

  7. hbase0.94.11版本和hbase1.4.9版本的benchamark区别

    1.起初使用ycsb对hbase进行benchmark,分别在100%写的情况下检测写性能:在100%读的情况下检测读的性能.实验数据如下: 2.新版本的habse写性能竟然不如老版本.!!!.于是我 ...

  8. Python 面向对象4-继承

    #!/usr/bin/env python # -*- coding:utf-8 -*- # 作者:Presley # 邮箱:1209989516@qq.com # 时间:2018-08-05 # O ...

  9. PHP中使用CURL实现GET和POST请求(转载)

    CURL 是一个利用URL语法规定来传输文件和数据的工具,支持很多协议,如HTTP.FTP.TELNET等.最爽的是,PHP也支持 CURL 库.使用PHP的CURL 库可以简单和有效地去抓网页.你只 ...

  10. L3-002 特殊堆栈 (30 分) 模拟stl

    堆栈是一种经典的后进先出的线性结构,相关的操作主要有“入栈”(在堆栈顶插入一个元素)和“出栈”(将栈顶元素返回并从堆栈中删除).本题要求你实现另一个附加的操作:“取中值”——即返回所有堆栈中元素键值的 ...