forked from iamyuthan/HandyTools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCutChar.html
27 lines (25 loc) · 838 Bytes
/
CutChar.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<html>
<header>
</header>
<body>
<p id="demo">Cut Characters</p>
<span id="cutchar"></span>
<p>Some text, with a <code id="subject">code-formatted element</code> inside it.</p>
<script type="text/javascript">
window.onload=body_load;
function body_load()
{
var GET = {};
var query = window.location.search.substring(1);
var param = query.split("=");
var cutch1 = decodeURIComponent(param[1]);
var cutch2 = cutch1.replace(/"/g,'');
var cutch3 = cutch2.replace(/{/g,'');
var cutch4 = cutch3.replace(/}/g,'');
document.querySelector('#cutchar').innerHTML = cutch4;
const subject = document.querySelector('#subject');
subject.insertAdjacentHTML('beforeend', cutch4);
}
</script>
</body>
</html>