??xml version="1.0" encoding="utf-8" standalone="yes"?> <TABLE style="table-layout: auto | fixed"> 使用:style="word-break : break-all;" 对于在英文中使用,请用style="table-layout:fixed; word-wrap:break-word" ============================================================================== word-wrap同word-break的区?/span> word-wrap: word-break: ȝ如下Q?br />
word-wrap是控制换行的?br />
使用break-wordӞ是将强制换行。中文没有Q何问题,英文语句也没问题。但是对于长串的英文Q就不v作用?/span> break-word是控制是否断词的?br />
normal是默认情况,英文单词不被拆开?br />
break-allQ是断开单词。在单词到边界时Q下个字母自动到下一行。主要解决了(jin)长串英文的问题?br />
keep-allQ是指Chinese, Japanese, and Korean不断词。即只用此时Q不用word-wrapQ中文就不会(x)换行?jin)。(英文语句正常。)(j) ff下:(x) 目前主要的问题存在于 长串英文 ?英文单词被断开。其实长串英文就是一个比较长的单词而已?br />
卌文单词应不应该被断开那?那问题很明显?jin),昄不应该被断开?jin)?br />
对于长串英文Q就是恶意的东西Q自然不用去了(jin)。但是,也要想些办法Q不让它把容器撑大?br />
用:(x)overflow:auto; ie下,长串?x)自动折行。ff下,长串?x)被遮盖?/p>
另,试代码如下Q?/p>
1.htm=================================================================== <style> .c1{ width:300px; border:1px solid red} <br> <br> <br> <br> <br> <br> ȝ?jin)一下,只要在CSS中定义了(jin)如下句子Q可保网不?x)再被撑开?jin)?/p>
自动换行问题,正常字符的换行是比较合理?而连l的数字和英文字W常常将容器撑大,人头?下面介绍的是CSS如何实现换行的方?/p>
对于div,p{块U元?/p>
正常文字的换?亚洲文字和非亚洲文字)元素拥有默认的white-space:normal,当定义的宽度之后自动换行 html IE览?/p>
q箋的英文字W和阿拉伯数?使用word-wrap: break-word ;或者word-break:break-all;实现强制断行 html css Firefox览?br />
q箋的英文字W和阿拉伯数字的断行,Firefox的所有版本的没有解决q个问题,我们只有让超?gu)界的字符隐藏或?l容器添加滚动条 html css 对于table元素 Firefox览?/p>
1. 使用 table-layout:fixed;强制table的宽?内层td,th采用word-break : break-all;或者word-wrap : break-word ;换行Q用overflow:hidden;隐藏出内,q里overflow:auto;无法起作?lt;table style="table-layout:fixed" width="200"><tr> <td width="25%" style="word-break : break-all; overflow:hidden; ">abcdefghigklmnopqrstuvwxyz1234567890</td> <td width="75%" style="word-wrap : break-word; overflow:hidden; ">abcdefghigklmnopqrstuvwxyz1234567890</td> </tr></table> 最佳CSS定义换行代码.wrap { table-layout:fixed; word-break: break-all; overflow:hidden; } 1)、sigkeyZ人鉴权keyQ请勿修改,否则无法发v临时?x)话?/p>
2)、(f)时会(x)话图?lt;img border="0" SRC='http://wpa.qq.com/pa?p=1:80000805:1' alt="点击q里l我发消?> SRC是图标链接,自定义图标中可以替换q一部分己图片的链接Q?/p>
参数Q?/p>
P=以冒?#8220;:”分隔多个参数 W一个参Cؓ(f)版本P目前?Q?/p>
W二个ؓ(f)QQ/TML(fng)Q?/p>
W三个参Cؓ(f)囑փ风格Q支持多U状态?/p>
alt是图标旁留言?/p>
3)、除?jin)自定义图标需要修改(f)时会(x)话图标外Q其他情况下不要修改代码Q因为有可能D在不同的环境和浏览器下,无法发v临时?x)话?/p>
自定义在UK格图?/p>
用JS实现Q具体步骤如下:(x) 1) 甌代码 2) 定义online数组Q必Lonline命名 <script>var online= new Array();</script>
3) 获取在线状?/p>
<script src="http://webpresence.qq.com/getonline?Type=1&80000805:"></script> 可以获取多个Q必M冒号分隔Q以冒号l尾Q比? <script src="http://webpresence.qq.com/getonline?Type=1&80000805:10000:123456:"></script> online[0]=0,表示80000805ȝ online[1]=1,表示10000在线 online[2]=1,表示123456在线 填写L(fng)的先后顺序,分别对应数组online??? 4) d代码 把SRC='http://wpa.qq.com/pa?p=1:80000805:1'替换q囄Q比?
auto: 默认?br />
fixed: 宽度固定,截断出的内?br />
<TABLE style="word-break: normal | break-all | keep-all">
normal: 默认?按字词截断换?br />
break-all: 截断q换?br />
keep-all: 不截断不换行
使用:style="table-layout:fixed;"
表示输出停止,停留在设定的长度?
表示对超镉K?换行再l显C?
推荐使用word-wrap:break-word;word-break:break-all;table-layout:fixed;
normal Default. Content exceeds the boundaries of its container.
break-word Content wraps to next line, and a word-break occurs when necessary. 必要时会(x)触发word-break?/p>
normal Default. Allows line breaking within words. 好像是只对Asian text起作用?br />
break-all Behaves the same as normal for Asian text, yet allows the line to break arbitrarily for non-Asian text. This value is suited to Asian text that contains some excerpts of non-Asian text.
keep-all Does not allow word breaking for Chinese, Japanese, and Korean. Functions the same way as normal for all non-Asian languages. This value is optimized for text that includes small amounts of Chinese, Japanese, or Korean.
ie下:(x)
使用word-wrap:break-word;所有的都正常?/p>
如这2个都不用的话Q中文不?x)出M问题。英文语句也不会(x)出问题。但是,长串英文?x)出问题?br />
Z(jin)解决长串英文Q一般用word-wrap:break-word;word-break:break-all;。但是,此方式会(x)DQ普通的英文语句中的单词?x)被断开Qie下也是)(j)?/p>
所以,lgQ?span style="line-height: 21px; color: #ff0000; ">最好的方式是word-wrap:break-word;overflow:hidden;而不是word-wrap:break-word;word-break:break-all;?br />
word-wrap:break-word;overflow:auto;在ie下没有Q何问题。在ff下,长串?x)被遮住部分内容?/span>
.c1{ width:300px; border:1px solid red}
.c2{ width:300px;word-wrap:break-word; border:1px solid yellow}
.c3{ width:300px;word-wrap:break-word;word-break:break-all; border:1px solid green}
.c4{ width:300px;word-wrap:break-word;word-break:keep-all; border:1px solid blue}
.c5{ width:300px;word-break:break-all; border:1px solid black}
.c6{ width:300px;word-break:keep-all; border:1px solid red}
.c7{ width:300px;word-wrap:break-word;overflow:auto; border:1px solid yellow}
</style>
<div class="c1">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c1>
This is all English. This is all English. This is all English.
</div>
<div class=c1>
全是中文的情c(din)全是中文的情况。全是中文的情况?br />
</div>
<div class=c1>
中英文排的情况。Chinese and English. 中英文排的情况。Chinese and English.
</div>
.c2{ width:300px;word-wrap:break-word; border:1px solid yellow}
<div class="c2">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c2>
This is all English. This is all English. This is all English.
</div>
<div class=c2>
全是中文的情c(din)全是中文的情况。全是中文的情况?br />
</div>
<div class=c2>
中英文排的情况。Chinese and English. 中英文排的情况。Chinese and English.
</div>
.c3{ width:300px;word-wrap:break-word;word-break:break-all; border:1px solid green}
<div class="c3">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c3>
This is all English. This is all English. This is all English.
</div>
<div class=c3>
全是中文的情c(din)全是中文的情况。全是中文的情况?br />
</div>
<div class=c3>
中英文排的情况。Chinese and English. 中英文排的情况。Chinese and English.
</div>
.c4{ width:300px;word-wrap:break-word;word-break:keep-all; border:1px solid blue}
<div class="c4">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c4>
This is all English. This is all English. This is all English.
</div>
<div class=c4>
全是中文的情c(din)全是中文的情况。全是中文的情况?br />
</div>
<div class=c4>
中英文排的情况。Chinese and English. 中英文排的情况。Chinese and English.
</div>
.c5{ width:300px;word-break:break-all; border:1px solid black}
<div class="c5">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c5>
This is all English. This is all English. This is all English.
</div>
<div class=c5>
全是中文的情c(din)全是中文的情况。全是中文的情况?br />
</div>
<div class=c5>
中英文排的情况。Chinese and English. 中英文排的情况。Chinese and English.
</div>
.c6{ width:300px;word-break:keep-all; border:1px solid red}
<div class="c6">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c6>
This is all English. This is all English. This is all English.
</div>
<div class=c6>
全是中文的情c(din)全是中文的情况。全是中文的情况?br />
</div>
<div class=c6>
中英文排的情况。Chinese and English. 中英文排的情况。Chinese and English.
</div>
.c7{ width:300px;word-wrap:break-word;overflow:auto; border:1px solid yellow}
<div class="c7">
safjaskflasjfklsajfklasjflksajflksjflkasjfksafj
</div>
<div class=c7>
This is all English. This is all English. This is all English.
</div>
<div class=c7>
全是中文的情c(din)全是中文的情况。全是中文的情况?br />
</div>
<div class=c7>
中英文排的情况。Chinese and English. 中英文排的情况。Chinese and English.
</div>
]]>
table不能换行问题 一般是Q一行里面全是数字或是字母或者结有多个感叹可(g)导?table不能换行Q中文默认的?x)自动换行的Q字母不能换行问题:(x)
style="table-layout:fixed; word-break: break-all; overflow:hidden;"
复制代码在单元格属性里加入上面q句Q如Q?br />
<td style="table-layout:fixed; word-break: break-all; overflow:hidden;">
复制代码用表格做|页排版的时候,一般都能正怋用。偏偏有时会(x)到一D连l的英文词或者一堆感叹号(!!!)把网就撑开的现象?/p>
<div id="wrap">正常文字的换?亚洲文字和非亚洲文字)元素拥有默认的white-space:normal,当定?lt;/div>
css
#wrap{white-space:normal; width:200px; }
<div id="wrap">abcdefghijklmnabcdefghijklmnabcdefghijklmn111111111</div>
#wrap{word-break:break-all; width:200px;}
或?
#wrap{word-wrap:break-word; width:200px;}
<div id="wrap">abcdefghijklmnabcdefghijklmnabcdefghijklmn111111111</div>
#wrap{word-break:break-all; width:200px; overflow:auto;}
IE览?br />
1. 使用 table-layout:fixed;强制table的宽?多余内容隐藏<table style="table-layout:fixed" width="200"><tr><td>abcdefghigklmnopqrstuvwxyz1234567890ssssssssssssss</td></tr></table>
复制代码2. 使用 table-layout:fixed;强制table的宽?内层td,th采用word-break : break-all;或者word-wrap : break-word ;换行 <table width="200" style="table-layout:fixed;"><tr><td width="25%" style="word-break : break-all; ">abcdefghigklmnopqrstuvwxyz 1234567890</td><td style="word-wrap : break-word ;">abcdefghigklmnopqrstuvwxyz 1234567890</td></tr></table>
复制代码3.在td,th中嵌套div,p{采用上面提到的div,p的换行方?/p>
复制代码2.在td,th中嵌套div,p{采用上面提到的对付Firefox的方法?/p>
复制代码当然Q这U现象出现的几率很小Q但是不能排除网友的恶搞?
]]>
<a href="http://sighttp.qq.com/cgi-bin/check?sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d";target=_blank; onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;"><img border="0" SRC='http://wpa.qq.com/pa?p=1:80000805:1' alt="点击q里l我发消?></a>
else document.write("<a href="http://sighttp.qq.com/cgi-bin/check?sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d"; target=_blank; onclick="var tempSrc='http://sighttp.qq.com/wpa.js?rantime='+Math.random()+'&sigkey=81a37f0b7cac68639bddfdb9b93a6c92bc211f3e3a4e683afbb31a079382dc9d';var oldscript=document.getElementById('testJs');var newscript=document.createElement('script');newscript.setAttribute('type','text/javascript'); newscript.setAttribute('id', 'testJs');newscript.setAttribute('src',tempSrc);if(oldscript == null){document.body.appendChild(newscript);}else{oldscript.parentNode.replaceChild(newscript, oldscript);}return false;"><img border="0" SRC='http://xxxx/online.jpg' alt="点击q里l我发消?></a>"); </script>
我是q样看的Q用tx的方法得到某QQh否在U,用js判断Q显Conline.jpg或者outline.jpgq两个图片,其余不变?img src ="http://www.aygfsteel.com/chenglu/aggbug/324381.html" width = "1" height = "1" />
]]>
]]>
/^[A-Za-z0-9]+$/ 匚w由数字和26个英文字母组成的字符?br />
/^[a-z]+$/匚w?6个英文字母的写l成的字W串
只能输入数字Q?^[0-9]*$/
只能输入n位的数字Q?^\d{n}$/
只能输入m-n位的数字Q?^\d{m,n}$/
只能输入有两位小数的正实敎ͼ(x)/^[0-9]+(\.[0-9]{2})?$/
验证Email地址Q?^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/
匚ww䆾证:(x)/^(\d{14}|\d{17})(\d|[xX])$/
匚wip地址Q?\d+).(\d+).(\d+).(\d+)
匚w腾讯QQP(x)/[1-9][0-9]{4,}/腾讯QQ号从10000开?br />
匚w中文字符的正则表辑ּQ? [\u4e00-\u9fa5] /
</script>
扣错Q?/p>
错在
if(isEmpty(form.uid.value)||isEmpty(form.password.value)||isEmpty(form.confirmPassword.value)||isEmpty(form.email.value)||isEmpty(form.quesstion.value)||isEmpty(form.answer.value)||){
q里错了(jin)QisEmpty(form.answer.value)||){
意思就是无论如何都是会(x)q回一个true的!
怪不得我在form表单里添加这个函数没作用Q哎Q以后还是小?j)?f)好啊Q?/p>