Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

XHTMLÓëHTMLÖ®¼äµÄ7¸öÇø±ð

ÀϵĻ°ÌâÁË£¬µ«ÊÇÎÒ»¹ÊÇ´ÓÀ´Ã»ÓÐÕûÀí¹ý¡£ÕâÀïÕûÀíÒ»ÏÂ:
ÔÚXHTMLÖУ¬<html>¡¢<head>¡¢<body>¶¼ÊDZØÐèµÄ±êÇ©¡£
±ØÐëÉèÖÃ<html>±êÇ©µÄxmlnsÊôÐÔ£¬ÇÒÆäֵΪ“http://www.w3.org/1999/xhtml”¡£
ËùÓÐÔªËض¼±ØÐë½áÊø¡£ÈκÎÆðʼ±êǩҪôÓÐÒ»¸ö¶ÔÓ¦µÄ½áÊø±êÇ©£¨Èç¹ûËüÊÇÒ»¸öÈÝÆ÷µÄ»°£©£¬ÒªÃ´ÊÇÒ»¸ö×Ô½áÊøÔªËØ“¿Õ¸ñ¼ÓбÏß”¡£
ËùÓбêÇ©¶¼±ØÐëÊÇСд¡£
ÈκÎÊôÐÔֵҪôÓõ¥ÒýºÅÒýÆðÀ´£¬ÒªÃ´ÓÃË«ÒýºÅÒýÆðÀ´¡£Èçclass=page¾ÍÊDz»ºÏ·¨µÄ£¬¶øclass='page'ºÍclass="page"¾ùÊǺϷ¨µÄ¡£
ËùÓÐÊôÐÔ±ØÐëÓÐÖµ¡£ÓÐЩÊôÐÔ£¬±ÈÈç<option>±êÇ©µÄselectedÊôÐÔ£¬ÔÚHTMLÖпÉÒÔʹÓüòдÐÎʽ£¬¼´<option selected>Êý¾Ý</option>£¬È»ºóÔÚXHTMLÖУ¬±ØÐëÕâÑù±àд£º<option selected="selected">Êý¾Ý</option>¡£
“&”·ûºÅ±ØÐë±àÂë¡£Ò²¾ÍÊÇ˵£¬Ó¦¸Ã½«Æäд³É“&amp;”¶ø²»Êǽö½öд³É“&”¡£²»¹ÜÊÇ“&”ÔÚÕýÎÄÖл¹ÊÇÔÚURLÖУ¬ÕâÒ»µãʼÖÕ¶¼³ÉÁ¢¡£


Ïà¹ØÎĵµ£º

PHPÖÐʹÓÃstrip_tags() È¥³ýhtml±êÇ©

 
ƽʱÓà htmlspecialchars() À´¹ýÂËhtml, µ«ÊÇ°ÑhtmlµÄ×Ö·ûתÒåÁË,×îºóÏÔʾ³öÀ´µÄ¾ÍÊÇhtmlÔ´´úÂë, ÀûÓÃstrip_tags()¾Í¿ÉÒÔ°Ñhtml±êÇ©È¥³ýµô.
[php]
$str = 'harryxu
‘;
echo(htmlspecialchars($str) . ‘
‘);
echo(strip_tags($str));
// output:
// harryxu
// harryxu
?> 
......

javascript ¿ØÖÆ htmlÔªËØ ÏÔʾ/Òþ²Ø


javascript ¿ØÖÆ htmlÔªËØ ÏÔʾ/Òþ²Ø
1¡£±àдjsº¯Êý
 <script type="text/javascript">
function display(y){$(y).style.display=($(y).style.display=="none")?"":"none";} 
function $(s){return document.getElementById(s);}
 </script>
2. ÒªÏÔʾ/Òþ²ØµÄhtmlÔªËؼÓÉÏ id ÊôÐÔ
< ......

ʲôÊÇXML¼°XMLºÍHTMLµÄÇø±ð

XML±»Éè¼ÆÓÃÀ´ÃèÊöÊý¾Ý£¬Æä½¹µãÊÇÊý¾ÝµÄÄÚÈÝ¡£
HTML±»Éè¼ÆÓÃÀ´ÏÔʾÊý¾Ý£¬Æä½¹µãÊÇÊý¾ÝµÄÍâ¹Û¡£    
Ó¦¸ÃÕÆÎյĻù´¡ÖªÊ¶£º
ÔÚÄú¼ÌÐøѧϰ֮ǰ£¬ÐèÒª¶ÔÒÔÏÂ֪ʶÓлù±¾µÄÁ˽⣺
HTML / XHTML
JavaScript or VBScript
ʲôÊÇXML?
XMLÖ¸¿ÉÀ©Õ¹±ê¼ÇÓïÑÔ£¨EXtensible Markup Language£©
XMLÊÇÒ»Ö ......

js html¶ÔÏóͨÓÃÊôÐÔ×ܽá ÊÕ²Ø


           1£ºstyle¡¢style.cssText¼°style.position,style.leftµÈCSSÑùʽµÄ¸÷¸öÊôÐÔ
            È磺
           var section=document.createEleme ......

Ö´ÐÐJSPºóÉú³ÉHTML¾²Ì¬Îļþ

import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.Servl ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ