妥了,SFL@_@K<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="[email protected]" />
<meta name="keywords" content="javascript" />
<meta name="description" content="for javascript region of csdn" />
</head> <body>
<table border="1" cellpadding="0">
<tr>
<td id="tdShow" width="50" height="50" valign="top" style="word-break: break-all;background-color:#ffff99">1.1</td>
<td width="50" height="50" valign="top">1.2</td>
</tr>
<tr>
<td width="50" height="50" valign="top">2.1</td>
<td width="50" height="50" valign="top">2.2</td>
</tr>
</table>
<textarea id="taaInput" rows="15" cols="70">Input</textarea> <script type="text/javascript">
<!--
var oInput = document.getElementById("taaInput");
var oOutput = document.getElementById("tdShow");
var oShow = document.getElementById("btnShow");oInput.onkeydown = function() {
oOutput.innerHTML = this.value;
};
oOutput.onpropertychange = function() {
if (this.clientHeight > parseInt(this.height))
{
var s = "Alert: over flow!\n";
s += "Original heigth: " + this.height + "\n";
s += "Current heigth: " + this.clientHeight + "\n";
alert(s);
}
};
//-->
</script>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="[email protected]" />
<meta name="keywords" content="javascript" />
<meta name="description" content="for javascript region of csdn" />
</head> <body>
<table border="1" cellpadding="0">
<tr>
<td id="tdShow" width="50" height="50" valign="top" style="word-break: break-all;background-color:#ffff99">1.1</td>
<td width="50" height="50" valign="top">1.2</td>
</tr>
<tr>
<td width="50" height="50" valign="top">2.1</td>
<td width="50" height="50" valign="top">2.2</td>
</tr>
</table>
<textarea id="taaInput" rows="15" cols="70">Input</textarea> <script type="text/javascript">
<!--
var oInput = document.getElementById("taaInput");
var oOutput = document.getElementById("tdShow");
var oShow = document.getElementById("btnShow");oInput.onkeydown = function() {
oOutput.innerHTML = this.value;
};
oOutput.onpropertychange = function() {
if (this.clientHeight > parseInt(this.height))
{
var s = "Alert: over flow!\n";
s += "Original heigth: " + this.height + "\n";
s += "Current heigth: " + this.clientHeight + "\n";
alert(s);
}
};
//-->
</script>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货