Contributions > Plugins, tips, and tricks
How to pass the W3C check, follow me!
(1/1)
Yiwu:
the orignial code:
--- Quote ---<!-- webim button --><a href="/webim/client.php?locale=zh-cn" target="_blank" onclick="if(navigator.userAgent.toLowerCase().indexOf('opera') != -1 && window.event.preventDefault) window.event.preventDefault();this.newWindow = window.open('/webim/client.php?locale=zh-cn&url='+escape(document.location.href)+'&referrer='+escape(document.referrer), 'webim', 'toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=640,height=480,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;"><img src="/webim/button.php?image=webim&lang=zh-cn" border="0" width="148" height="45" alt=""/></a><!-- / webim button -->
--- End quote ---
the w3c standard code:
--- Quote ---<script type="text/javascript">
// <![CDATA[
function kefu()
{
if(navigator.userAgent.toLowerCase().indexOf('opera') != -1 && window.event.preventDefault) window.event.preventDefault();this.newWindow = window.open('http://www.***.com/webim/client.php?locale=zh-cn', 'webim', 'toolbar=0,scrollbars=0,location=0,status=1,menubar=0,width=740,height=500,resizable=1');this.newWindow.focus();this.newWindow.opener=window;return false;
}
// ]]>
</script>
<a href="#" onclick="kefu()"><img src="http://www.***.com/webim/button.php?image=webim" border="0" alt="袜子铺在线客服,订购热线" style="padding-top:10px;" /></a>
--- End quote ---
LOL, so the Webim is perfect now:)
Navigation
[0] Message Index
Go to full version