Размер файла: 1.58Kb
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Replacing emoji symbols</title>
<link href="design/css/emoji.css" rel="stylesheet" type="text/css" />
<style>
* { font-family: Tahoma,Helvetica,sans-serif; font-size: 12px; }
body { background: #f0f0f0; }
h1 { padding-left: 5px; font-size: 18px; }
table { width : 400px; }
table th { width : 200px; text-align: left; padding: 0; font-weight: normal; font-size: 11px; }
table td { background : #ffffff; height: 100px; vertical-align: top; padding: 4px; }
.description { font-size: 11px; padding: 10px 5px; }
</style>
<script type="text/javascript" src="design/js/emoji.js"></script>
<script type="text/javascript">
//---
// var text = document.getElementById('body').innerHTML;
//innerHTML;
function onload ()
{
var text = document.getElementById('body').innerHTML;
document.getElementById('body').innerHTML = window.emoji.replace(text);
}
</script>
</head>
<body id="body" onload="onload();">
<h1>Replacing emoji symbols</h1>
<table cellspacing="5" cellpadding="0">
<thead>
<tr>
<th>Original text: 😁</th>
<th>After replacing: 😏</th>
</tr>
</thead>
<tbody>
<tr>
<td id="original"></td>
<td id="transformed">😋😻👽👠💼🌎⛄️🍒</td>
</tr>
</tbody>
</table>
<!-- See more: http://as3coder.blogspot.com/2014/08/emoji.html -->
</body>
</html>