js换⾏符替换成空格英⽂括号换成中⽂括号
输⼊:
Random testing is not only a useful testing technique in itself, but also plays a core role in many other
testing methods. Hence, any significant improvement to random testing has an impact throughout the
software testing community. Recently, Adaptive Random Testing (ART) was proposed as an effective alternative to random testing. This paper presents a synthesis of the most important research results related
to ART. In the course of our research and through further reflection, we have realised how the techniques
and concepts of ART can be applied in a much broader context, which we present here. We believe such
ideas can be applied in a variety of areas of software testing, and even beyond software testing. Amongst
these ideas, we particularly note the fundamental role of diversity in test case selection strategies. We
hope this paper serves to provoke further discussions and investigations of these ideas
输出:
Random testing is not only a useful testing technique in itself, but also plays a core role in many other testing methods. Hence, any significant improvement to random testing has an impact throughout the software testing community. Recently, 代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<textarea id="big-textarea" placeholder="paste your origin html " rows="30" cols="150">
</textarea>
<button id="big-button">Generate</button>
<script type="text/javascript">
let button = document.querySelector('#big-button');
button.addEventListener('click', event => {
let textArea = document.querySelector('#big-textarea');
let inputTxt = textArea.value;
textArea.value = 回车2空格(inputTxt);
});
</script>
<script type="text/javascript">
function回车2空格(inputTxt) {
let modifiedTxt = place(/\n/g, " ");
return modifiedTxt;
}
</script>
</body>
</html>
还有⼀个需求,就是⽤在线翻译后,括号变成英⽂括号:
javascript是什么意思中文翻译<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<textarea id="big-textarea" placeholder="paste your origin html " rows="30" cols="150">
</textarea>
<button id="btn1">回车2空格</button>
<button id="btn2">英⽂括号2中⽂括号</button>
<script type="text/javascript">
let button1 = document.querySelector('#btn1');
button1.addEventListener('click', event => {
let textArea = document.querySelector('#big-textarea');
let inputTxt = textArea.value;
textArea.value = 回车2空格(inputTxt);
});
let button2 = document.querySelector('#btn2');
button2.addEventListener('click', event => {
let textArea = document.querySelector('#big-textarea');
let inputTxt = textArea.value;
textArea.value = 英⽂括号2中⽂括号(inputTxt);
});
</script>
<script type="text/javascript">
function回车2空格(inputTxt) {
let modifiedTxt = place(/\n/g, " ");
return modifiedTxt;
}
function英⽂括号2中⽂括号(inputTxt) {
let modifiedTxt1 = place(/\(/g, "(");
let modifiedTxt2 = place(/\)/g, ")");
return modifiedTxt2;
}
</script>
</body>
</html>
英⽂括号2中⽂括号.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。