ÓÃJSÅжÏÒ»¸öhtmlÔªËØÊÇ·ñ´æÔÚµÄÎåÖÖ·½·¨
ÓÃjavascriptÅжÏÒ»¸öhtmlÔªËØÊÇ·ñ´æÔÚµÄÎåÖÖ·½·¨£º
1. ÅÐ¶Ï±íµ¥ÔªËØÊÇ·ñ´æÔÚ£¨Ò»£©
if("periodPerMonth" in document.theForm){
return true;
}else{
return false;
}
2. ÅжÏÒ³ÃæÔªËØÊÇ·ñ´æÔÚ
if(document.getElementById("XXX")){
//´æÔÚ
}
3. ÅÐ¶Ï±íµ¥ÔªËØÊÇ·ñ´æÔÚ£¨¶þ£©
if(document.theForm.periodPerMonth){
//´æÔÚ
}
»ò
if(typeof(document.theForm.periodPerMonth)=="object"){
//´æÔÚ
}
4. ÅÐ¶Ï±íµ¥ÊÇ·ñ´æÔÚ
if(document.theForm){
//´æÔÚ
}
5.ÓÃJqueryд½Å±¾
if ( $("#someID").length > 0 ){
$("#someID").text("hi");
}
Ïà¹ØÎĵµ£º
<html>
<head>
<mce:style type = "text/css"><!--
table
{
border-collapse:collapse;
}
td
{
border:solid 1px black;
}
--></mce:style><style type = "text/css" mce_bogus="1">table
{
border-collapse:collapse;
}
td
......
Ò»¡¢ ÐèÇ󣺽«HTMLתPDF´òÓ¡¡£WebÏîÄ¿ÖÐ×ÜÊÇÓÐÕâÑùµÄÐèÇ󣬺ÜÊÇÈÃÈË¿àÄÕ¡£
¶þ¡¢ ·ÖÎö£ºÈçºÎÍê³ÉÕâ¸ö¹¤×÷£¿
1¡¢ ÐèÒª½âÎöHTML£¬È»ºóÀûÓÃitextsharp»æÖÆpdfÎĵµ¡£½âÎöHTMLÊÇÒ»¸öºÜÄÑÍê³ÉµÄÈÎÎñ£¬¸÷¸öä¯ÀÀÆ÷¶ÔHTMLµÄ½âÎöÎ廨°ËÞÍÖªµÀÕâ²»ºÃ½â¾ö¡£ÕâÌõ·²»ºÃ×ߣ¬µ«Ò²ÊÇ¿ÉÒÔÍê³ÉµÄ£¬Í¨¹ýwebbrowserÀà¿ÉÒÔ½âÎöHTML»ñÈ¡¸÷¶ÔÏóµ ......
ÉÏÃæËù˵ÓйØHTMLµÄÄÚÈݷdz£ÉÙÓÖ¼òµ¥,µ«¶ÔÒѾÁ˽âµÄÈËÀ´Ëµ¾ÍÊÇûÓõÄ.
ÈçÓÐÎÊÌâ¿Éµ½È¨ÍþÍø http://www.html.com/ Éϲ鿴
ÒÔÏ¿ªÊ¼ËµËµ¹ØÓÚXMLµÄһЩ֪ʶ.
XMLÒ²ÊDZê¼ÇÓïÑÔ,¿ÉËüÊÇ×Ô¶¨ÒåµÄ,ûÓÐÒѸø¶¨¸ñʽ.²»¾ßÌå˵Ëü,¸ø³öÀý×ӾͿÉÃ÷ÁË.
Èç
<NAME>TOM</NAME>
<SEX>M</SEX>
ÒÔÉÏÄÚÈݵÄ< ......