求Javascript 代码:怎样在改变页面大小时,里面的输入域也跟着变化

来源:百度知道 编辑:UC知道 时间:2024/05/19 15:09:23
求Javascript 代码:怎样在改变页面大小时,里面的输入域也跟着变化
也就是我在调整页面大小时 <textarea> 域的长宽也跟着相应变化,它与页面的边界始终不变

谢谢!
1. 另外,求教怎样在页面里让英文单词在换行时作为一个整体,而不是被拆开成两部份

<!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>文档</title>
<style>
html,body {
padding:0;
margin:0;
height:100%;
}
</style>
</head>
<body>
<div style="width:500px;height:100px;border:1px solid;overflow:hidden;word-break:keep-all;">Ctrip.com International Ltd. is a leading consolidator of hotel accommodations and airline tickets in China. The company aggregates information on hotels and flights and enable customers to make informed and cost-effective hotel and flight bookings. It acts as an agent in