<(|辉煌amp平台是否正规在哪|)>

今天看啥 热点:
一般我们很少见HR,但一见可能就定生死。HTML中也一样,我们不常见&hr /&,但一见通常就决定了能否拥用完美分割线。这里,就不附图了,直接列表供查阅吧:
&&正常浏览器&IE6、7&Firefox实际高度&height + border-right-width + border-left-width&height&height背景色&background-color&background+color(当高度&2px时,显示高度为灰色投影,需要color来设置颜色,相同于文字)&background-color比如想创建一个实际高度为3px, 四边为1px, 边框颜色为#07f, 其他部分颜色为#f60的分割线,你懂的:
*height:3 color:#f60;/* for ie6 ie7 */;
background-color:#f60;
border:1px solid #07f;
@-moz-document url-prefix(){ hr{height:3}} /* for firefox */
还有其他更省力的解决方法么?
暂无相关文章
相关搜索:
相关阅读:
相关频道:
&&&&&&&&&&&&&&&&&&
HTML/CSS最近更新Shouldn't a browser's textarea display raw text? Look at the following snaps from , and pay attention to the &script& tag:
1- We can see the angled brackets around the script word:
2- Now look at the source of the page. We can see the angled brackets are represented by their HTML entities:
3- Click to edit the post and you'll see that the angled brackets are visible in the textarea--NOT their HTML entities:
4- Look at the XHR response from the server (when we clicked edit), we can see the HTML entities and NOT the angled brackets we see in the textarea:
How is it possible that the textarea--when editing the post--displays the angled brackets and not their HTML entities? Shouldn't textareas display raw text? I tried this on my site, and the textarea shows the HTML entities, and not brackets, with identical source code.
The post page also shows the angled brackets even when they are inside code and pre tags. Shouldn't they be output as raw text too? I also tried this on my site, and the page shows the HTML entities, and not the angled brackets.
What I am missing here?
I'm asking because struggling with implementing a feature on my site. I want to show people the encoded entities when they go to edit something, but I want to store a raw version. SO seems to have done, but I have no idea how.
解决方案 See
and consider
in HTML (take a peek at the
although do note it is insufficient to entirely describe HTML).
The script (and style) elements have such a CDATA designation while textarea does not. Store the data as it ("unescaped") but make sure to HTML-encoded outside of CDATA sections in the HTML (and even inside, take care to guard against terminators like &/anything -- the & and / characters must be separated to be entirely legal in HTML). See
for some more details.
Happy coding.
本文地址: &
浏览器的textarea是否应显示原始文字?查看,并注意& script& 标记:
1-我们可以看到围绕脚本字的尖括号:
2-现在看一下页面的源代码。我们可以看到尖括号由它们的HTML实体表示:
3-单击以编辑帖子,您会看到尖括号可见textarea
- 不是其HTML实体:
4-看看服务器的XHR响应(当我们点击编辑)可以看到HTML实体,而不是我们在textarea中看到的尖括号:
- 显示尖括号而不是它们的HTML实体?应该不是textareas显示原始文本?我尝试在我的网站上,并且textarea显示HTML实体,而不是括号,具有相同的源代码。
帖子页也显示了尖括号,即使他们是代码和 pre 标签。它们不应该作为原始文本输出吗?我也在我的网站上试过这个,页面显示的是HTML实体,而不是尖括号。
这里缺少什么?
我问,因为在我的网站上实现一个功能。我想在编辑实体时向他们显示编码实体,但我想存储一个原始版本。 SO似乎已经做了,但我不知道如何。
解决方案 请参阅,并考虑(查看
本文地址: &
扫一扫关注官方微信&1重定向1.1&&&&& 重定向符号&&&&&&&&&&&&&&& 输出重定向到一个文件或设备 覆盖原来的文件&!&&&&&&&&&&&&& 输出重定向到一个文件或设备 强制覆盖原来的文件&&&&&&&&&&&&&& 输出重定向到一个文件或设备 追加原来的文件&&&&&&&&&&&&&&& 输入重定向到一个程序&1.2标准错误重定向符号2&&&&&&&&&&&&& 将一个标准错误输出重定向到一个文件或设备 覆盖原来的文件& b-shell2&&&&&&&&&&&& 将一个标准错误输出重定向到一个文件或设备 追加到原来的文件2&&1&&&&&&&& 将一个标准错误输出重定向到标准输出 注释:1 可能就是代表 标准输出&&&&&&&&&&&&&& 将一个标准错误输出重定向到一个文件或设备 覆盖原来的文件& c-shell|&&&&&&&&&&&&&& 将一个标准错误 管道 输送 到另一个命令作为输入1.3命令重导向示例在 bash 命令执行的过程中,主要有三种输出入的状况,分别是:1. 标准输入;代码为 0 ;或称为 stdin ;使用的方式为 &2. 标准输出:代码为 1 ;或称为 stdout;使用的方式为 1&3. 错误输出:代码为 2 ;或称为 stderr;使用的方式为 2&[test @test test]# ls -al&&&list.txt将显示的结果输出到 list.txt 文件中,若该文件以存在则予以取代![test @test test]# ls -al&&&&list.txt将显示的结果累加到 list.txt 文件中,该文件为累加的,旧数据保留![test @test test]# ls -al&&1&&list.txt&&&2&&list.err将显示的数据,正确的输出到 list.txt&错误的数据输出到 list.err[test @test test]# ls -al 1& list.txt 2&&&1将显示的数据,不论正确或错误均输出到 list.txt 当中!错误与正确文件输出到同一个文件中,则必须以上面的方法来写!不能写成其它格式![test @test test]# ls -al 1& list.txt 2& /dev/null将显示的数据,正确的输出到 list.txt 错误的数据则予以丢弃!&/dev/null ,可以说成是黑洞装置。为空,即不保存。1.4为何要使用命令输出重导向o 当屏幕输出的信息很重要,而且我们需要将他存下来的时候;o 背景执行中的程序,不希望他干扰屏幕正常的输出结果时;o 一些系统的例行命令(例如写在 /etc/crontab 中的文件)的执行结果,希望他可以存下来时;o 一些执行命令,我们已经知道他可能的错误讯息,所以想以『 2& /dev/null 』将他丢掉时;o 错误讯息与正确讯息需要分别输出时。2&& 管线命令 ( pipe )就如同前面所说的, bash 命令执行的时候有输出的数据会出现,那么如果这群数据必需要经过几道手续之后才能得到我们所想要的格式,应该如何来设定?这就牵涉到管线命令的问题了( pipe ),管线命令使用的是『 | 』。例子:简单的管线命令假设我们要读取 last 这个指令中,那个 root 登入的『次数』应该怎么作?那么我所进行的步骤是:1. 执行 last ,将所有这个月的所有人登入数据取出来;2. 使用 grep 将上面的输出数据(stdout)当中的 root 撷取出来,其它的不要;3. 使用 wc 这个可以计算行数的指令将上一步的数据计算行数!由于 last 的输出是一行代表一次登入,所以只要计算几行就代表登入几次的意思,经由上面三个步骤,将 last 数据逐步的筛选,就可以得到我们的数据了!整个命令可以写成如下: [test @test bin]# last | grep root | wc -l这个管线命令『 | 』仅能处理经由前面一个指令传来的正确信息,也就是standard output ( STDOUT ) 的信息,对于 stdandard error 并没有直接处理的能力。2.1基本的管线命令指令介绍o cut语法:[root @test /root ]# cut -d &分隔字符& [-cf] fields参数说明:-d :后面接的是用来分隔的字符,预设是『空格符』-c :后面接的是『第几个字符』-f :后面接的是第几个区块?范例:[root @test /root]# cat /etc/passwd | cut -d &:& -f 1将 passwd 这个文件里面,每一行里头的 : 用来作为分隔号,而列出第一个区块!也就是姓名所在啦![root @test /root]# last | cut -c1-20将 last 之后的数据,每一行的 1-20 个字符取出来!o sort语法:[root @test /root ]# sort [-t 分隔符] [(+起始)(-结束)] [-nru]参数说明:-t 分隔符:使用分隔符来隔开不同区间,预设是 tab+start -end:由第 start 区间排序到 end 区间-n :使用『纯数字』排序(否则就会以文字型态来排序)-r :反向排序-u :相同出现的一行,只列出一次!范例:[root @test /root]# cat /etc/passwd | sort将列出来的个人账号排序![root @test /root]# cat /etc/passwd | sort -t: +2n将个人账号中,以使用者 ID 来排序(以 : 来分隔,第三个为 ID ,但第一个代号为 0 之故)[root @test /root]# cat /etc/passwd | sort -t: +2nr反相排序啰!o wc语法:[root @test /root ]# wc [-lmw]参数说明:-l :多少行-m :多少字符-w :多少字范例:[root @test /root]# cat /etc/passwd | wc -l这个文件里头有多少行?[root @test /root]# cat /etc/passwd | wc -w这个文件里头有多少字!?o uniq这个指令用来将『重复的行删除掉只显示一个』语法:[root @test /root ]# uniq范例:[root @test /root]# last | cut -d& & -f1 | sort | uniqo tee命令重定向到文件的同时将数据显示在屏幕上语法:[root @test /root ]# last | tee last.list | cut -d & & -f1范例:[root @test /root]# last | tee last.list | cut -d & & -f1o tr语法:[root @test /root ]# tr [-ds] SET1参数说明:-d :删除 SET1 这个字符串&&-s :取代掉重复的字符!范例:[root @test /root]# last | tr '[a-z]' '[A-Z]' &==将小写改成大写[root @test /root]# cat /etc/passwd | tr -d : &== : 这个符号在 /etc/passwd 中不见了![root @test /root]# cat /home/test/dostxt | tr -d '/r' & dostxt-noMo split语法:[root @test /root ]# split [-bl] 输入文件 输出文件前导字符参数说明:-b :以文件 size 来分-l :以行数来分范例:[root @test /root]# split -l 5 /etc/passwd test &==会产生 testaa, testab, testac... 等等的文件说明:在 Linux 底下就简单的多了!你要将文件分割的话,那么就使用 -b size 来将一个分割的文件限制其大小,如果是行数的话,那么就使用 -l line 来分割!管线命令在 bash 的连续的处理程序中是相当重要的!另外,在 log file 的分析当中也是相当重要的一环。管道输送到一个命令的标准输入可以使用标准输入参数”-“ 进行更仔细的控制.如cat命令的示例eg:& sort mylist | moresort mylist | cat –n | lprpwd | cat – mylist | lpr
版权声明:本文为博主原创文章,未经博主允许不得转载。
最新教程周点击榜
微信扫一扫}

我要回帖

更多关于 amp lt 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信