JS文本框增大缩小功能 现在又一个文本域,即textarea,当我双击的时候可以增大其高和宽,再双击的时候又恢复原样。用jquery或javascript如何实现 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 function cl(){document.getElementById["TextBox1"].style.width="800px"; document.getElementById["TextBox1"].style.height="800px"; }ondblclick 事件<input type="text" id ="tt" ondblclick="cl()"/> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head> <title>new document</title></head><body><script> function changeSize(txt){ if(txt.rows == 10){ txt.rows = 20; txt.cols = 60; }else{ txt.rows = 10; txt.cols = 50; } }</script><textarea rows="10" cols="50" ondblclick="changeSize(this)"></textarea></body></html> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <title>changeTextarea.html</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(function () { var locked = true; $("textarea").dblclick(function () { if (locked) { locked = false; this.rows = 30; this.cols = 50; } else { locked = true; this.rows = 10; this.cols = 30; } }); }); </script> </head> <body> <textarea rows="10" cols="30"></textarea> </body></html> 急急急急!cookie禁用后仍能用document.cookie =来写入cookie form表单提交,怪异 变量需要定义吗? 现在要在登录的时候把用户名写到cookie里面,然后在别的页面把cookie读取出来,代码怎么写? js异步加载的问题 关于<div style="width:x;heihgt:x"> 的有关说明 求JAVA SCRIPT电子版基础教程 高分求得到当前文件夹下的所有文件名或文件夹名称的写法? 请问eval()函数有什么用? 时间大小的比较 javascript日期处理问题。。。 Javascript问题 help。。。。。。。。
{
document.getElementById["TextBox1"].style.width="800px";
document.getElementById["TextBox1"].style.height="800px";
}ondblclick 事件
<input type="text" id ="tt" ondblclick="cl()"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>new document</title>
</head>
<body>
<script>
function changeSize(txt){
if(txt.rows == 10){
txt.rows = 20;
txt.cols = 60;
}else{
txt.rows = 10;
txt.cols = 50;
}
}
</script>
<textarea rows="10" cols="50" ondblclick="changeSize(this)"></textarea>
</body>
</html>
<html>
<head>
<title>changeTextarea.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(function () {
var locked = true;
$("textarea").dblclick(function () {
if (locked) {
locked = false;
this.rows = 30;
this.cols = 50;
} else {
locked = true;
this.rows = 10;
this.cols = 30;
}
});
});
</script>
</head>
<body>
<textarea rows="10" cols="30"></textarea>
</body>
</html>