<!DOCTYPE html> <html> <HEAD><meta http-equiv='Content-Type' content='text/html; charset=utf-8'> <style type="text/css"> body{background: #ECE9D8;} h1{color:black;text-align:left;} p{font-family:"Times New Roman";font-size:30px;} input[type="text"][disabled] {color:black;} </style> <script src="js/udf.js"></script> <script> function eventHandler(event){ var _Table=event.data ; var _a = _Table.split('_');_refreshv(_a[0],_a[1]); var _Records = _Table.split('&'); // javascript split for (_Recno in _Records){ var _Fields = _Records[_Recno].split(','); for (_FieldNo in _Fields){ _refresh("td_id"+"["+_Recno+"]"+"["+_FieldNo+"]",_Fields[_FieldNo]); } } } function functionName(){ _t2="?code="+_lookup("code1"); var Server ="dataProvider" var enquire=Server+_t2; var source2=new EventSource(enquire); source2.addEventListener("message", eventHandler, true); } </script> </HEAD> <body> <h1>Header Description</h1> <form id="form0" OnSubmit=""> Code : <input id="code1" type="text" size="8">
<button type="button" onclick=" functionName(); ">Display</button> <br> Time : <input id="datetime" type="text" value="" size="40" readonly disabled><br> <table border="1" id="td_id"> <tr> <th>field1</th> <th>field2</th> <th>field3</th> <th>field 4</th> <th>field 5</th>
</tr> </table> </form> </body> <script type="text/javascript"> _gentable("td_id",8,10); _setfocus("code1"); </script> </html>
html語言代碼示例
回覆刪除段落標籤左右浮動