The data: scheme can contain binary data such as image.
Firefox and Opera supports the data: scheme, but IE doesn't yet.
<img id="icon_here">
<script>
var data = 'data:image/gif;base64,'+
'R0lGODlhAAEwAMQAAJ2M5Me98GRK1DoYyYBr3PHv++Pe99XO81Y50auc6PBkZEgpzbmt7HJa2I57'+
// snip //
'fS3CqU7XGYgE+GqHvrLJ8Tr6qXmqiwAF9CffgnMNqmWHAWNBwwGsKpKsrmJqltOOV69nuYxSkqpo'+
'Tata18rWtrr1rTIIAQA7';
var icon_elem = document.getElementById("icon_here");
icon_elem.src = data;
</script>
Trackback URL:http://www.kawa.net/service/tb/ajaxtb.cgi/works/js/data-scheme/base64-e.html
Kawa.netxp © Copyright 2006 Yusuke Kawasaki