<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Everyday NetLog]]></title> 
<link>https://blog.zhoz.com/index.php</link> 
<description><![CDATA[z-NetLog]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Everyday NetLog]]></copyright>
<item>
<link>https://blog.zhoz.com/read.php?791</link>
<title><![CDATA[ios width=100%超出问题]]></title> 
<author> &lt;&gt;</author>
<category><![CDATA[技术开发]]></category>
<pubDate>Thu, 10 Jan 2019 07:31:52 +0000</pubDate> 
<guid>https://blog.zhoz.com/read.php?791</guid> 
<description>
<![CDATA[ 
	css - Width 100% not working on iOS - Stack Overflow<br/>主要原因，当”scrolling”设置为”yes”的时候ios根本就直接忽略了iframe设置的宽度和高度。<br/>有很多复杂的解决办法，Js调整、设置屏幕等。<br/>Try by simplifying your meta name viewport (at least for iOS) to the following line:<br/><meta name="viewport" content="width=device-width,initial-scale=1" /><br/>最简单粗暴的解决方法就是：<br/><div class="code"><br/>&lt;style type=&quot;text/css&quot;&gt;<br/>&nbsp;&nbsp;.iframe_box &#123; <br/>&nbsp;&nbsp;&nbsp;&nbsp;overflow: scroll; <br/>&nbsp;&nbsp;&nbsp;&nbsp;-webkit-overflow-scrolling: touch; <br/>&nbsp;&nbsp;&nbsp;&nbsp;min-width: 100%; <br/>&nbsp;&nbsp;&nbsp;&nbsp;*width:100%; <br/>&nbsp;&nbsp;&nbsp;&nbsp;width:1px; <br/>&nbsp;&nbsp;&nbsp;&nbsp;height:450px;<br/>&nbsp;&nbsp;&#125;<br/>&lt;/style&gt;<br/><br/>&lt;iframe class=&quot;iframe_box&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; src=&quot;http://blog.zhoz.com&quot; &gt;&lt;/iframe&gt;<br/></div><br/><br/>作用点：<br/>class="iframe_box" <br/>scrolling="no"<br/>Tags - <a href="https://blog.zhoz.com/tag.php?tag=%25E5%25BC%2582%25E5%25B8%25B8%25E5%25A4%2584%25E7%2590%2586" rel="tag">异常处理</a> , <a href="https://blog.zhoz.com/tag.php?tag=%25E5%2589%258D%25E7%25AB%25AF%25E8%25AE%25BE%25E8%25AE%25A1" rel="tag">前端设计</a>
]]>
</description>
</item><item>
<link>https://blog.zhoz.com/read.php?768</link>
<title><![CDATA[根据userAgent最全的智能(sp)手机check方法]]></title> 
<author> &lt;&gt;</author>
<category><![CDATA[技术开发]]></category>
<pubDate>Fri, 17 Oct 2014 09:10:48 +0000</pubDate> 
<guid>https://blog.zhoz.com/read.php?768</guid> 
<description>
<![CDATA[ 
	手机语言版本的判断<br/><br/>使用navigator.browserLanguage 便可得出windows phone语言版本， <br/>当然可恶的小小手机语言版本也有兼容性的差异，兼容Mozilla，以及AppleWebKit内核的浏览器访问其语言版本，它会列出 navigator.language<br/>比较特别的地方<br/><br/>UC浏览器没有安卓报头，只返回：linux ，这里粗略的根据linux来判断是安卓（前提必须满足是移动终端，UC这点是满足的）<br/><br/>安卓QQ浏览器HD版检测的结果是：mac， Safari<br/><br/><textarea name="code" class="JAVA" rows="15" cols="100">
<script type="text/javascript">
/*
* 智能机浏览器版本信息:
*
*/
&nbsp;&nbsp;var browser=&#123;
&nbsp;&nbsp;&nbsp;&nbsp;versions:function()&#123; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var u = navigator.userAgent, app = navigator.appVersion; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return &#123;//移动终端浏览器版本信息 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;trident: u.indexOf('Trident') > -1, //IE内核
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;presto: u.indexOf('Presto') > -1, //opera内核
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mobile: !!u.match(/AppleWebKit.*Mobile.*/)&#124;&#124;!!u.match(/AppleWebKit/), //是否为移动终端
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ios: !!u.match(/&#92;(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;android: u.indexOf('Android') > -1 &#124;&#124; u.indexOf('Linux') > -1, //android终端或者uc浏览器
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iPhone: u.indexOf('iPhone') > -1 &#124;&#124; u.indexOf('Mac') > -1, //是否为iPhone或者QQHD浏览器
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iPad: u.indexOf('iPad') > -1, //是否iPad
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;webApp: u.indexOf('Safari') == -1 //是否web应该程序，没有头部与底部
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#125;(),
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; language:(navigator.browserLanguage &#124;&#124; navigator.language).toLowerCase()
&#125; 
document.writeln("语言版本: "+browser.language);
document.writeln(" 是否为移动终端: "+browser.versions.mobile);
document.writeln(" ios终端: "+browser.versions.ios);
document.writeln(" android终端: "+browser.versions.android);
document.writeln(" 是否为iPhone: "+browser.versions.iPhone);
document.writeln(" 是否iPad: "+browser.versions.iPad);
document.writeln(navigator.userAgent);
 
</script>
</textarea><br/>Tags - <a href="https://blog.zhoz.com/tag.php?tag=js" rel="tag">js</a> , <a href="https://blog.zhoz.com/tag.php?tag=wap1.1%252Cwap1.2%252Cwap2.0" rel="tag">wap1.1,wap1.2,wap2.0</a> , <a href="https://blog.zhoz.com/tag.php?tag=%25E6%259C%25BA%25E7%25A7%258D%25E4%25BF%25A1%25E6%2581%25AF" rel="tag">机种信息</a> , <a href="https://blog.zhoz.com/tag.php?tag=%25E6%25B5%258F%25E8%25A7%2588%25E5%2599%25A8" rel="tag">浏览器</a>
]]>
</description>
</item><item>
<link>https://blog.zhoz.com/read.php?741</link>
<title><![CDATA[JS失去焦点函数onblur：输入身份证号自动输出性别]]></title> 
<author> &lt;&gt;</author>
<category><![CDATA[技术开发]]></category>
<pubDate>Fri, 08 Mar 2013 08:12:45 +0000</pubDate> 
<guid>https://blog.zhoz.com/read.php?741</guid> 
<description>
<![CDATA[ 
	多年的站友，讨论了关于JS的问题。<br/>功能：输入身份证号自动输出性别<br/>原理：JS计算输入值，失去焦点函数onblur，填充另外表单元素。<br/>代码：<br/><textarea name="code" class="html" rows="15" cols="100">
<script language="javascript">
&nbsp;&nbsp;function wolf(x) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;var No = document.getElementById(x).value.substring(14,15);
&nbsp;&nbsp;&nbsp;&nbsp;switch (document.getElementById(x).value.length) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 15:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (No % 2 == 0) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById("tsex").value='女'; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125; else &#123;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById("tsex").value='男'; 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 18:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;
&nbsp;&nbsp;&nbsp;&nbsp;&#125;
</script>

<form id="form2" name="form2" method="post" action="register.asp">
&nbsp;&nbsp;身份证号：<input name="tsfd" type="text" id="tsfd" size="20" maxlength="18" onblur="wolf(this.id)" /><br />
&nbsp;&nbsp;性别：<input type="text" name="tsex" id="tsex" size="5" /><br />
<input type="submit" name="button" id="button" value="保存" />
</form>
</textarea><br/>Tags - <a href="https://blog.zhoz.com/tag.php?tag=js" rel="tag">js</a>
]]>
</description>
</item><item>
<link>https://blog.zhoz.com/read.php?732</link>
<title><![CDATA[结对编程技术理论-入门]]></title> 
<author> &lt;&gt;</author>
<category><![CDATA[技术开发]]></category>
<pubDate>Thu, 10 Jan 2013 09:19:40 +0000</pubDate> 
<guid>https://blog.zhoz.com/read.php?732</guid> 
<description>
<![CDATA[ 
	从表面上看，结对编程技术只是一个非常简单的概念：两名程序员使用同一台计算机去完成同一项任务。<br/>程序设计实践：<br/>两名程序员并肩工作在同一台计算机前，共同探讨设计方案、共同设计算法、共同编写程序代码、共同完成各种测试。<br/>在这两个人当中，被称为“驾驶员”的那个人负责打字或写出设计方案，被称为“领航员”的另一个人负责其他工作，<br/>包括随时观察驾驶员的工作情况，发现并纠正其操作性和策略性失误。<br/>操作性失误包括各种语法错误、打字错误、用错了函数，等等。<br/>策略性失误包括驾驶员偏离了正确方向——即他正在编写的代码不能让这两位搭档到达预定目标等的各种情况。<br/>领航员扮演着战略思想家的角色。<br/>领航员对问题有着更为客观的视角和对事态发展方向有更全面的思考。<br/>另一件大好事是驾驶员和领航员至少每隔45~60 秒就会交流一次，有时只是一句简单的“啊？”<br/>定期交换驾驶员和领航员的角色也是非常重要的。<br/>结对编程技术的好处：<br/>1）质量。由两位搭档合作编写出来的代码有着更少的缺陷。<br/>2）时间。根据我们掌握的数据，两位搭档合作编写出同样高质量的代码所花费的时间通常最多只需要他们各自独立编程时的一半。<br/>这意味着项目的开发周期能够在既不增加整体预算也不降低代码质量的前提下大大缩短。 <br/>3）忠诚度。结对程序员都是快乐的编程搭档，而快乐的员工很少会另谋高就，所以这将提高他们对企业的忠诚度。 <br/>4）信任与团队精神。结对编程技术能够加深编程搭档之间的相互了解并建立信任，这对改善团队的精神面貌有着莫大的好处。 <br/>5）知识交流。结对程序员，尤其是那些搭档并不固定的结对程序员，对项目及其进展情况往往有着更全面的了解。 <br/>6）促进学习。通过观察自己的编程搭档如何分析问题以及如何运用编程语言和软件开发工具去解决问题，结对程序员将不断地学习到一些新的知识。 <br/>这些好处不仅体现在新代码的开发工作中，在老代码的维护或功能扩展工作中也同样有所体现。<br/>Tags - <a href="https://blog.zhoz.com/tag.php?tag=%25E4%25BA%25BA%25E7%2594%259F%25E4%25BF%25AE%25E7%2582%25BC" rel="tag">人生修炼</a> , <a href="https://blog.zhoz.com/tag.php?tag=%25E9%25A1%25B9%25E7%259B%25AE%25E7%25AE%25A1%25E7%2590%2586" rel="tag">项目管理</a> , <a href="https://blog.zhoz.com/tag.php?tag=%25E5%259B%25A2%25E9%2598%259F%25E5%25BB%25BA%25E8%25AE%25BE" rel="tag">团队建设</a>
]]>
</description>
</item><item>
<link>https://blog.zhoz.com/read.php?729</link>
<title><![CDATA[flv网页播放器源码]]></title> 
<author> &lt;&gt;</author>
<category><![CDATA[技术开发]]></category>
<pubDate>Sat, 05 Jan 2013 07:45:43 +0000</pubDate> 
<guid>https://blog.zhoz.com/read.php?729</guid> 
<description>
<![CDATA[ 
	朋友问的，我也顺手研究了一下。从youku等网站下载的flv格式的文件，用传统的SWF网页源码不行，应该是这样：<br/><textarea name="code" class="html" rows="15" cols="100">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" height="420" width="490"> 
<param name="movie" value="http://log.zhoz.com/zhoz_play.swf?vcastr_file=1.flv"> 
<param name="quality" value="high"> 
<param name="allowFullScreen" value="true" /> 
<embed src="http://log.zhoz.com/zhoz_play.swf?vcastr_file=1.flv" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="520" height="540"> 
</embed> 
</object> 
</textarea><br/>可以用于任何网页，部分限制了html的网页除外。将1.flv改为你实际的flv的路径即可。<br/>Tags - <a href="https://blog.zhoz.com/tag.php?tag=%25E8%25B0%2583%25E7%25A0%2594%25E6%258A%25A5%25E5%2591%258A" rel="tag">调研报告</a> , <a href="https://blog.zhoz.com/tag.php?tag=%25E7%25BD%2591%25E9%25A1%25B5%25E6%2592%25AD%25E6%2594%25BE%25E5%2599%25A8" rel="tag">网页播放器</a>
]]>
</description>
</item><item>
<link>https://blog.zhoz.com/read.php?701</link>
<title><![CDATA[xmlhttp.open post大数据的问题]]></title> 
<author> &lt;&gt;</author>
<category><![CDATA[技术开发]]></category>
<pubDate>Sat, 22 Sep 2012 15:31:38 +0000</pubDate> 
<guid>https://blog.zhoz.com/read.php?701</guid> 
<description>
<![CDATA[ 
	虽然是周末，被客户盯着躲在家里加了一天班，现在还在继续……<br/>刚才同事在Ajax提交表单的时候，遇到个问题。说获取不到xmlhttp.open post所提交的内容。<br/>看了下代码，原来是这个问题。。。<br/>核心代码如下：<br/><br/><textarea name="code" class="JavaScript" rows="15" cols="100">
var xmlHttp=Common.createXMLHttpRequest(); 
xmlHttp.onreadystatechange = Common.getReadyStateHandler(xmlHttp, eval("turnOperatorPage")); 
xmlHttp.open("POST",url,true); 
xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 
xmlHttp.send(fracasStr); 
fracasOperator.reset();
</textarea><br/>另外个神奇的地方就是，它还可以解决表单中的格式及编码问题。<br/><br/>Tags - <a href="https://blog.zhoz.com/tag.php?tag=ajax" rel="tag">ajax</a> , <a href="https://blog.zhoz.com/tag.php?tag=%25E5%25AD%2597%25E7%25AC%25A6%25E4%25B9%25B1%25E7%25A0%2581" rel="tag">字符乱码</a>
]]>
</description>
</item><item>
<link>https://blog.zhoz.com/read.php?679</link>
<title><![CDATA[提示内容框跟随鼠标效果/Img Alt效果]]></title> 
<author> &lt;&gt;</author>
<category><![CDATA[技术开发]]></category>
<pubDate>Wed, 14 Apr 2010 15:49:50 +0000</pubDate> 
<guid>https://blog.zhoz.com/read.php?679</guid> 
<description>
<![CDATA[ 
	++昨天问到关于Mouse放到图片上显示出内容。<br/>开始以为只是文字显示。后来才知道需要的是TestArae显示多种类型的。<br/>代码实现方法：Js+Css。<br/><textarea name="code" class="html" rows="15" cols="100">
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<title>提示内容框跟随鼠标效果/Img Alt效果</title>
<style type="text/css">
div&#123;
&nbsp;&nbsp;background-color:#99CC99;
&nbsp;&nbsp;width:350px;
&nbsp;&nbsp;height:350px;
&nbsp;&nbsp;position:relative;
&#125;
span&#123;
&nbsp;&nbsp;background-color: #99CCCC ;
&nbsp;&nbsp;width:100px;
&nbsp;&nbsp;height:40px;
&nbsp;&nbsp;line-height:40px;
&nbsp;&nbsp;text-align:center;
&nbsp;&nbsp;position:absolute;
&nbsp;&nbsp;display:block;
&nbsp;&nbsp;font-size:12px;
&nbsp;&nbsp;top:0px;
&nbsp;&nbsp;left:0px;
&nbsp;&nbsp;display:none;
&#125;
</style>

<script type="text/javascript">
function show_coords(event)
&nbsp;&nbsp;&#123;
&nbsp;&nbsp;x=event.clientX
&nbsp;&nbsp;y=event.clientY
&nbsp;&nbsp;var tiper=document.getElementById("tip");
&nbsp;&nbsp;tiper.style.display="block";
&nbsp;&nbsp;tiper.style.left=event.clientX+"px"
&nbsp;&nbsp;tiper.style.top=event.clientY+"px"
&#125;
function close_coords()
&nbsp;&nbsp;&#123;
&nbsp;&nbsp;var tiper=document.getElementById("tip");
&nbsp;&nbsp;tiper.style.display="none";
&#125;
</script>
</head>
<body&nbsp;&nbsp; >
<div onmousemove="show_coords(event);" onmouseout="close_coords();"><span id="tip"><img src="http://www.zhoz.com/images/zhoz.gif">这是zhoz.com上的图片</span></div>
</body>
</html>
</textarea><br/>Tags - <a href="https://blog.zhoz.com/tag.php?tag=js" rel="tag">js</a> , <a href="https://blog.zhoz.com/tag.php?tag=css" rel="tag">css</a>
]]>
</description>
</item><item>
<link>https://blog.zhoz.com/read.php?616</link>
<title><![CDATA[selectbox中multiple的js使用方法]]></title> 
<author> &lt;&gt;</author>
<category><![CDATA[技术开发]]></category>
<pubDate>Thu, 16 Jul 2009 15:56:35 +0000</pubDate> 
<guid>https://blog.zhoz.com/read.php?616</guid> 
<description>
<![CDATA[ 
	在多选框中，通常会使用到这种形式：<br/>&lt;select id=&quot;large_category_id&quot; name=&quot;large_category_id[]&quot; size=&quot;5&quot; multiple&gt;<br/>而又有&lt;option value=&quot;&quot; &lt;?=$selected_flg ?&gt;&gt;请指定&lt;/option&gt;值为空的情况，这就需要当默认选择这个的时候，<br/>提示用户必需选择。<br/>还有一个总结：当ＳｅｌｅｃｔＢｏｘ中选择其中一项时，会出现输入框；代码如下：<br/><textarea name="code" class="HTML" rows="15" cols="100">&lt;table&gt;

&lt;/t&nbsp;&nbsp;&nbsp;&nbsp;&lt;tr&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;选择分类&lt;/td&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;td&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;select id=&quot;large_category_id&quot; name=&quot;large_category_id[]&quot; size=&quot;5&quot; multiple&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;&quot; &lt;?=$selected_flg ?&gt;&gt;请指定&lt;/option&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (count($chara_large_category_list) &gt; 0) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;foreach ($chara_large_category_list as $tmp) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;?&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;&lt;?=$tmp-&gt;id ?&gt;&quot; &lt;?=in_array($tmp-&gt;id, $large_category_id_list) ? &quot;selected&quot; : &quot;&quot; ?&gt;&gt;&lt;?=htmlspecialchars($tmp-&gt;title)?&gt;&lt;/option&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;?
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;?&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/select&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/td&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/tr&gt;
&lt;/table&gt;</textarea><br/>Ｊｓ的Check方法：<br/><br/><textarea name="code" class="JS" rows="15" cols="100">
&nbsp;&nbsp;large_category_id_tmp = document.getElementById(&#039;large_category_id&#039;).options;
&nbsp;&nbsp;var check_flg = true;
&nbsp;&nbsp;&nbsp;&nbsp;for (i=0; i &lt; large_category_id_tmp.length; i++) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (large_category_id_tmp[i].selected &amp;&amp; large_category_id_tmp[i].value != &quot;&quot;) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;check_flg = false;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;
&nbsp;&nbsp;&#125;
&nbsp;&nbsp;if (check_flg) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;alert (&quot;请选择！&quot;);
&nbsp;&nbsp;&nbsp;&nbsp;return;
&nbsp;&nbsp;&#125;</textarea><br/><br/>有了上面的了解，就可以很容易的实现当selectbox中选择不同的值，而出现不同的表单项目。<br/><br/><textarea name="code" class="HTML" rows="15" cols="100">&lt;select name=&quot;wwwzhozcom&quot; onchange=&quot;doChange(this)&quot;&gt;
.
.
.

&lt;div id=&quot;temp_answer&quot; style=&quot;display:&lt;?=$dis_flg ?&gt;&quot;&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;请输入:&lt;input id=&quot;temp_answer&quot; type=&quot;text&quot; name=&quot;zhozcom&quot; value=&quot;&lt;?=htmlspecialchars($temp_answer) ?&gt;&quot; /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;</textarea><br/><textarea name="code" class="JavaScript" rows="15" cols="100">
function doChange() &#123;
&nbsp;&nbsp;if (document.zhoz_com.category.value == &quot;INPUT&quot;) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(&quot;temp_answer&quot;).style.display = &quot;block&quot;;
&nbsp;&nbsp;&#125; else &#123;
&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(&quot;temp_answer&quot;).style.display = &quot;none&quot;;
&nbsp;&nbsp;&#125;
&#125;</textarea><br/>Tags - <a href="https://blog.zhoz.com/tag.php?tag=js" rel="tag">js</a> , <a href="https://blog.zhoz.com/tag.php?tag=ajax" rel="tag">ajax</a>
]]>
</description>
</item><item>
<link>https://blog.zhoz.com/read.php?608</link>
<title><![CDATA[记录上次登录时间及IP信息的设计思想]]></title> 
<author> &lt;&gt;</author>
<category><![CDATA[技术开发]]></category>
<pubDate>Thu, 02 Jul 2009 14:58:51 +0000</pubDate> 
<guid>https://blog.zhoz.com/read.php?608</guid> 
<description>
<![CDATA[ 
	为了记录会员上次登录IP及时间等信息，通常会设计在相应的User_dat表中，当登录时更新这个字段。<br/>但稍加考虑会发现，这是不妥的，本次登录会更新记录，即得不到上次的登录信息。<br/>通常的商务网站，会员的登录信息显得非常重要，因此需要通过DB来记录各次的登录信息。<br/>而取得的方法是，N-1的那条记录就是上次登录信息。下面说明设计思路：<br/><strong>1、DB设计：</strong><br/>多种会员、可以设计下面字段：<br/>id,login_date,user_id,user_type,last_ip,...<br/><br/><strong>2、取得上次登录信息的那条记录Sql文：</strong><br/>SELECT * FROM zhoz_login_log WHERE user_id=&#039;1&#039; AND user_type=&#039;CN&#039; ORDER BY id DESC LIMIT 1 OFFSET 1;<br/><br/>Tags - <a href="https://blog.zhoz.com/tag.php?tag=sql" rel="tag">sql</a> , <a href="https://blog.zhoz.com/tag.php?tag=%25E6%2595%25B0%25E6%258D%25AE%25E5%25BA%2593%25E8%258C%2583%25E5%25BC%258F" rel="tag">数据库范式</a> , <a href="https://blog.zhoz.com/tag.php?tag=%25E6%2597%25A5%25E6%259C%259F%25E6%2597%25B6%25E9%2597%25B4" rel="tag">日期时间</a> , <a href="https://blog.zhoz.com/tag.php?tag=%25E7%25B3%25BB%25E7%25BB%259F%25E8%25AE%25BE%25E8%25AE%25A1" rel="tag">系统设计</a>
]]>
</description>
</item><item>
<link>https://blog.zhoz.com/read.php?590</link>
<title><![CDATA[IE6中select标签的option不能disabled的解决方案]]></title> 
<author> &lt;&gt;</author>
<category><![CDATA[技术开发]]></category>
<pubDate>Wed, 03 Jun 2009 10:59:40 +0000</pubDate> 
<guid>https://blog.zhoz.com/read.php?590</guid> 
<description>
<![CDATA[ 
	工作中需要用到disabled掉一些select的option，结果发现IE6没有实现它。 <br/>还好我们下载select-option-disabled-emulation.js文件即可自动完成disabled标记的工作。<br/>代码如下：<br/><br/><textarea name="code" class="js" rows="15" cols="100">
window.onload = function() &#123;
&nbsp;&nbsp;if (document.getElementsByTagName) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;var s = document.getElementsByTagName(&quot;select&quot;);

&nbsp;&nbsp;&nbsp;&nbsp;if (s.length &gt; 0) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window.select_current = new Array();

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (var i=0, select; select = s[i]; i++) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;select.onfocus = function()&#123; window.select_current[this.id] = this.selectedIndex; &#125;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;select.onchange = function()&#123; restore(this); &#125;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;emulate(select);
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;
&nbsp;&nbsp;&nbsp;&nbsp;&#125;
&nbsp;&nbsp;&#125;
&#125;

function restore(e) &#123;
&nbsp;&nbsp;if (e.options[e.selectedIndex].disabled) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;e.selectedIndex = window.select_current[e.id];
&nbsp;&nbsp;&#125;
&#125;

function emulate(e) &#123;
&nbsp;&nbsp;for (var i=0, option; option = e.options[i]; i++) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;if (option.disabled) &#123;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;option.style.color = &quot;graytext&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;&#125;
&nbsp;&nbsp;&nbsp;&nbsp;else &#123;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;option.style.color = &quot;menutext&quot;;
&nbsp;&nbsp;&nbsp;&nbsp;&#125;
&nbsp;&nbsp;&#125;
&#125;
</textarea><br/>Tags - <a href="https://blog.zhoz.com/tag.php?tag=js" rel="tag">js</a> , <a href="https://blog.zhoz.com/tag.php?tag=%25E6%25B5%258F%25E8%25A7%2588%25E5%2599%25A8" rel="tag">浏览器</a>
]]>
</description>
</item>
</channel>
</rss>