<html>
<head><title>test</title>
<style type="text/css">
body{width:200px;
height:200px;}
div{
width:200px;
height:150px;
padding: 0;
}
</style>
</head>
<script type="text/javascript">
var texts=[]
var count=0
function input_text(){
var c=Math.floor(Math.random()*1);
var all=new Date();
if(c==0)
{document.getElementById("idinp").value="Как дела?";
}else if(x==1){
if(all.GetHours<12 && all.GetHours>5){document.getElementById("idinp").value="Доброе утро,что не спим?";
} else {
document.getElementById("idinp").value="Что тварим?";}
}//else if(x==2){
}
function set_text(){
texts[count]=document.getElementById("idinp").value;
count++;
document.getElementById("idinp").blur();
input_text();
update();
}
function update(){
var tmp="<font color=#C0C0C0><i>Нету записей</i></font>";
for(i=0;i<count;i++){
if(texts[i]=='')continue;
if(tmp=="<font color=#C0C0C0><i>Нету записей</i></font>"){
tmp="<a href='#' onClick='free("+i+");'>"+texts[i]+"</a>";
}else{
tmp=tmp+"<br><a href='#' onClick='free("+i+");'>"+texts[i]+"</a>";
}
}
document.getElementById("text_line").innerHTML=tmp+"<br>_________________";
}
function free(n){
texts[n]="";
update();
}
</script>
<body onLoad="input_text();update();">
<div id="text_line">non</div>
<input type="text" size="20" value="" name="inp" id="idinp" onClick="document.getElementById('idinp').value='';" onChange="javascript:set_text()">
</body>
</html>
Работает везде где кроме IE ну и понятно-гаджетах,не обрабатывает onChange,как решить проблему?