���˶����y(c��)ԇ������http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip=218.192.3.42
�Ѻ�IP��ַ��ԃ�ӿڣ�Ĭ�J(r��n)GBK����http://pv.sohu.com/cityjson
�Ѻ�IP��ַ��ԃ�ӿڣ����O(sh��)�þ��a����http://pv.sohu.com/cityjson?ie=utf-8
�Ѻ������IP��ַ��ԃ�ӿڣ�http://txt.go.sohu.com/ip/soip
�vӍ�Ľӿڣ�http://fw.qq.com/ipaddress (�vӍ�Ľӿ�ԭ��������õģ��ɬF(xi��n)�ڴ��_��)
����Ľӿ������˵���js�ӿ��f����
<script type="text/javascript" src="
<script type="text/javascript">
function ipmsg() {
var ss = remote_ip_info['country']??+ remote_ip_info['province']+ remote_ip_info['city'];
document.getElementByIdx_x_x("<%=HiddenField1.ClientID %>").value = ss;
}
</script>
]]>
���ϴ��a��(sh��)�F(xi��n)�x���(xi��ng)���D(zhu��n)��ָ��朽�
]]>
<input type="file" onchange="document.getElementById('img').src=getFullPath(this);" >
=========================================================================
#�Д�IE߀��Firefox
function getFullPath(obj)
{
if(obj)
{
//ie
if (window.navigator.userAgent.indexOf("MSIE")>=1)
{
obj.select();
return document.selection.createRange().text;
}
//firefox
else if(window.navigator.userAgent.indexOf("Firefox")>=1)
{
if(obj.files)
{
return obj.files.item(0).getAsDataURL();
}
return obj.value;
}
return obj.value;
}
}
#���Y��
function yulan(){
var filePath =getFullPath(document.getElementById('UpFile'));
var fileText =filePath.substring(filePath.lastIndexOf("."),filePath.length);
var fileName =fileText.toLowerCase();
if ((fileName!='.jpg')&&(fileName!='.gif')&&(fileName!='.jpeg')&&(fileName!='.png')&&(fileName!='.bmp'))
{
alert("��(du��)����ϵ�y(t��ng)�H֧�֘�(bi��o)��(zh��n)��ʽ����Ƭ��Ո(q��ng)���{(di��o)����ʽ�������ς����x�x ��");
document.form1.UpFile.focus();
}
else
{
document.getElementById("preview").innerHTML="<img src='"+getFullPath(document.getElementById('UpFile'))+"' width=120 style='border:6px double #ccc'>";
}
}
#�Д��ļ���С
var Sys = {};
if(navigator.userAgent.indexOf("MSIE")>0) {
Sys.ie=true;
}
if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){
Sys.firefox=true;
}
var maxLength = 5*1024*1024;
function checkFileChange(obj) {
var filesize = 0;
if(Sys.firefox){
filesize = obj.files[0].fileSize;
}else if(Sys.ie){
var filePath = obj.value;
var image=new Image();
image.src=filePath;
filesize=image.fileSize;
}
alert(filesize);
}
�@ȡ�ļ���
firefox��input��ε�valueֵĬ�J(r��n)�Ϳ��ԫ@ȡ���ļ�������ie �t�@ʾ�ļ�·����
����Ҫ�^(q��)�e��(du��)������firefox�� lastIndexOf('/')�õ�����-1������ie�£�Ŀ��@ʾ�����Ƿ�б�ܣ�\����(d��ng)Ȼ��Linux
�£������g�[���@ȡ����������б�� / �� ���r(sh��)δ�C����Linux���Оg�[��file�@ȡ����ֵ��(hu��)��ȫ·������
���Ãɴ��Дࣺ
function getFileName(path){
var pos1 = path.lastIndexOf('/');
var pos2 = path.lastIndexOf('\\');
var pos = Math.max(pos1, pos2)
if( pos<0 )
return path;
else
return path.substring(pos+1);
}
���ز�����Y���ļ���
return name.substring(0,name.lastIndexOf('.'));
]]>���ӣ� 1.�oԪ�ع��Ќ����xֵ �����Ƕ��xcontainer�����Č��������<725�͞��Լ��Č��ȣ���t�͵���725���ஔ(d��ng)��max-width:725px;�� ����<style type="text/css" media="screen"> ����#container { width: expression((documentElement.clientWidth > 725) ? "725px" : "auto" ); } ����</style> ����2.�oԪ���Զ��x�����xֵ ��������������ϵ�朽�̓������ ͨ���������ǣ� ����<a href="link1.htm" onfocus="this.blur()">link1</a> ����<a href="link2.htm" onfocus="this.blur()">link2</a> ����<a href="link3.htm" onfocus="this.blur()">link3</a> �����ֿ����S߀�w�F(xi��n)��������expression�ă�(y��u)��(sh��)����������������Ў�ʮ�����ϰق�(g��)朽����@�r(sh��)�����y��߀��(hu��)�C(j��)еʽ��Ctrl+C��Ctrl+Vô���Λr����һ���^���Ă�(g��)�a(ch��n)����������a�����أ� ��������expression���������£� ����<style type="text/css"> ����a {star : expression(this.onFocus=this.blur());} ����</style> ����<a href="link1.htm">link1</a> ����<a href="link2.htm">link2</a> ����<a href="link3.htm">link3</a> �����f���������star�����Լ����ⶨ�x�Č�����������S�Լ�ϲ�����ⶨ�x������������expression()����Z�����JS�_���� ���Զ��x�����cexpression֮�g�Ʉe����߀��һ��(g��)��̖(h��o)����?y��n)�?sh��)�|(zh��)߀��CSS�����Է���style��(bi��o)����(n��i)������script��(n��i)��OK���@�Ӿͺ����� ����һ��Ԓ��(sh��)�F(xi��n)������е�朽�̓��������������^���Ȅe����������|�l(f��)����Ч��CSS�Č���׃������ô�����ĽY(ji��)����(hu��)����ı����в�e�����������S���(bi��o)���� �M(j��n)�Ƴ�����׃����е��ı����ɫ������������뮔(d��ng)Ȼ�ĕ�(hu��)�J(r��n)�鑪(y��ng)ԓ���� ����<style type="text/css"> ����input {star : expression(onmouseover=this.style.backgroundColor="#F5F5F5"; ����onmouseout=this.style.backgroundColor="#FFFFFF")} ����</style> ����<input type="text"> ����<input type="text"> ����<input type="text"> �����ɽY(ji��)���s�dz��F(xi��n)�_�����e(cu��)�����_�Č�����(y��ng)ԓ��CSS��ʽ�Ķ��x���M(j��n)����(sh��)��(n��i)��������ʾ�� ����<style type="text/css"> ����input {star : expression(onmouseover=function() ����{this.style.backgroundColor="#FF0000"}, ����onmouseout=function(){this.style.backgroundColor="#FFFFFF"}) } ����</style> ����<input type="text"> ����<input type="text"> ����<input type="text"> ����ע��:���Ƿdz���Ҫ��һ�㲻���hʹ��expression����?y��n)�expression��(du��)�g�[���YԴҪ����^����
]]>parseFloat()���ַ����D(zhu��n)�ɸ��c(di��n)��(sh��)
js��̎��׃���Ĕ�(sh��)�W(xu��)�\(y��n)��r(sh��)һ�c(di��n)Ҫע��׃����͵��D(zhu��n)�Q
JS �ַ����D(zhu��n)����(sh��) JS �ַ����D(zhu��n)����(sh��)������Ҫ�����N�D(zhu��n)�Q����(sh��)����(qi��ng)����� �D(zhu��n)�Q������js ׃��������D(zhu��n)�Q��
1.�D(zhu��n)�Q����(sh��)�� js �ṩ��parseInt()��parseFloat()�ɂ�(g��)�D(zhu��n)�Q����(sh��)��
ǰ�߰�ֵ�D(zhu��n)�Q���� ��(sh��)�����߰�ֵ�D(zhu��n)�Q�ɸ��c(di��n)��(sh��)��ֻ�Ќ�(du��)String ����{(di��o)���@Щ�������@�ɂ�(g��)����(sh��)�� �����_�\(y��n)������(du��)������ͷ��صĶ���NaN(Not aNumber)�� ���Д��ַ����Ƿ��ǔ�(sh��)��ֵǰ��parseInt()��parseFloat()����(hu��)�м�(x��)���� ԓ�ַ����� parseInt()�������Ȳ鿴λ��0 ̎���ַ����Д����Ƿ��ǂ�(g��)��Ч��(sh��)�֣��� ��������ԓ����������NaN�������^�m(x��)��(zh��)�����������������ԓ�ַ�����Ч��(sh��) ����ԓ�������鿴λ��1 ̎���ַ����M(j��n)��ͬ�ӵĜy(c��)ԇ���@һ�^�̌����m(x��)���l(f��)�F(xi��n) ����Ч��(sh��)�ֵ��ַ���ֹ���˕r(sh��) parseInt()����ԓ�ַ�֮ǰ���ַ����D(zhu��n)�Q�ɔ�(sh��)����
���������Ҫ���ַ���"1234blue"�D(zhu��n)�Q������(sh��)����ôparseInt()������ 1234����?y��n)�?d��ng)���z�y(c��)���ַ�b �r(sh��)���͕�(hu��)ֹͣ�z�y(c��)�^�̡� �ַ����а����Ĕ�(sh��)����������(hu��)�����_�D(zhu��n)�Q�锵(sh��)��������ַ���"0xA"��(hu��)���� �_�D(zhu��n)�Q�锵(sh��)��10�� ���^���ַ���"22.5"�����D(zhu��n)�Q��22����?y��n)�?du��)������(sh��)���f��С��(sh��)�c(di��n)�ǟoЧ�� ���� һЩʾ�����£� Js ���aparseInt("1234blue")��//returns 1234parseInt("0xA")�� //returns 10parseInt("22.5")��//returns 22parseInt("blue")��//returns NaNparseInt()����߀�л�ģʽ�����Ѷ��M(j��n)�������M(j��n)�ơ�ʮ���M(j��n)�ƻ������κ� �M(j��n)�Ƶ��ַ����D(zhu��n)�Q������(sh��)�� ������parseInt()�����ĵڶ���(g��)����(sh��)ָ���ģ�����Ҫ����ʮ���M(j��n)�Ƶ�ֵ�� �������{(di��o)��parseInt()������ Js ���aparseInt("AF",16)��//returns 175 ��(d��ng)Ȼ����(du��)���M(j��n)�������M(j��n)���� ����ʮ�M(j��n)��(Ĭ�J(r��n)ģʽ)���������@���{(di��o)��parseInt()������ Js ���aparseInt("10",2)��//returns 2parseInt("10",8)��//returns 8parseInt("10",10)��//returns 10 ���ʮ�M(j��n)�Ɣ�(sh��)����ǰ��(d��o)0����ô��ò��� ����(sh��)10���@�ӲŲ���(hu��)����صõ����M(j��n)�Ƶ�ֵ��
���磺 Js ���aparseInt("010")��//returns 8parseInt("010",8)��//returns 8parseInt("010",10)��//returns 10 ���@�δ��a�������д��a�����ַ��� "010"��������һ��(g��)��(sh��)������һ�д��a���@��(g��)�ַ����������M(j��n)�Ƶ�ֵ���������� ��ʽ�c�ڶ��д��a(������(sh��)��8)��ͬ�����һ�д��a������(sh��)��10������ iNum3 ������10�� parseFloat()�����cparseInt()������̎����ʽ��������λ��0 �_ʼ�鿴 ÿ��(g��)�ַ���ֱ���ҵ���һ��(g��)����Ч���ַ���ֹ��Ȼ���ԓ�ַ�֮ǰ���ַ����D(zhu��n) �Q�ɔ�(sh��)����
���^����(du��)���@��(g��)�������f����һ��(g��)���F(xi��n)��С��(sh��)�c(di��n)����Ч�ַ�������Ѓɂ�(g��) С��(sh��)�c(di��n)���ڶ���(g��)С��(sh��)�c(di��n)���������oЧ����parseFloat()������(hu��)���@��(g��)С��(sh��)�c(di��n)֮ ǰ���ַ����D(zhu��n)�Q�ɔ�(sh��)�֡��@��ζ���ַ���"22.34.5"����������22.34�� ʹ��parseFloat()��������һ��֮ͬ̎���ڣ��ַ��������ʮ�M(j��n)����ʽ�� ʾ���c(di��n)��(sh��)���������ð��M(j��n)����ʽ��ʮ���M(j��n)����ʽ�� ԓ������(hu��)����ǰ��(d��o)0�������M(j��n)�Ɣ�(sh��)0908 ����������908����(du��)��ʮ���M(j��n)�� ��(sh��)0xA��ԓ����������NaN����?y��n)��ڸ��c(di��n)��(sh��)�У�x ������Ч�ַ��� ������parseFloat()Ҳ�]�л�ģʽ�� ������ʹ��parseFloat()������ʾ���� Js ���aparseFloat("1234blue")��//returns 1234.0 parseFloat("0xA")�� //returns NaNparseFloat("22.5")��//returns 22.5parseFloat("22.34.5")�� //returns 22.34parseFloat("0908")��//returns 908parseFloat("blue")�� //returns NaN2.��(qi��ng)������D(zhu��n)�Q ߀��ʹ�Ï�(qi��ng)������D(zhu��n)�Q(type casting)̎���D(zhu��n)�Qֵ����͡�ʹ�Ï�(qi��ng)����� �D(zhu��n)�Q�����L���ض���ֵ����ʹ������һ�N��͵���
ECMAScript �п��õ�3 �N��(qi��ng)������D(zhu��n)�Q���£� Boolean(value)--�ѽo����ֵ�D(zhu��n)�Q��Boolean ����Number(value)--�ѽo�� ��ֵ�D(zhu��n)�Q�ɔ�(sh��)��(����������(sh��)���c(di��n)��(sh��))��String(value)--�ѽo����ֵ�D(zhu��n)�Q���� ������ ���@����(g��)����(sh��)֮һ�D(zhu��n)�Qֵ������(chu��ng)��һ��(g��)��ֵ�������ԭʼֱֵ���D(zhu��n)�Q�ɵ� ֵ���@��(hu��)������벻���ĺ���� ��(d��ng)Ҫ�D(zhu��n)�Q��ֵ��������һ��(g��)�ַ����ַ�������0 ��(sh��)�ֻ�?q��)��?��һ��(ji��)��ӑՓ �@һ�c(di��n))�r(sh��)��Boolean()����(sh��)������true�����ԓֵ�ǿ��ַ�������(sh��)��0�� undefined ��null����������false�� ����������Ĵ��a�Μy(c��)ԇBoolean �͵ď�(qi��ng)������D(zhu��n)�Q�� Js ���aBoolean("")��//false�C empty stringBoolean("hi")��//true�C non-empty stringBoolean(100)��//true�C non-zero numberBoolean(null)�� //false-nullBoolean(0)��//false-zeroBoolean(new Object())��//true�C objectNumber()�ď�(qi��ng)������D(zhu��n)�Q�cparseInt()��parseFloat()������̎����ʽ ������ֻ�����D(zhu��n)�Q��������(g��)ֵ�������Dz���ֵ�� ߀ӛ�Æ���parseInt()��parseFloat()����ֻ�D(zhu��n)�Q��һ��(g��)�oЧ�ַ�֮ǰ�� �ַ��������"4.5.6"�����D(zhu��n)�Q��"4.5"�� ��Number()�M(j��n)�Џ�(qi��ng)������D(zhu��n)�Q��"4.5.6"������NaN����?y��n)�����(g��)�ַ���ֵ�� ���D(zhu��n)�Q�ɔ�(sh��)���� ����ַ���ֵ�ܱ��������D(zhu��n)�Q��Number()���Д����{(di��o)��parseInt()����߀ ���{(di��o)��parseFloat()������ �±��f���ˌ�(du��)��ͬ��ֵ�{(di��o)��Number()������(hu��)�l(f��)������r�� �÷��Y(ji��)�� Js ���a Number(false)0Number(true)1Number(undefined)NaNNumber(null)0Number("5 .5")5.5Number("56")56Number("5.6.7")NaNNumber(new Object())NaNNumber(100)100 ���һ�N��(qi��ng)������D(zhu��n)�Q���� String()���(ji��n)�ε��� ��?y��n)����ɰ��κ�ֵ�D(zhu��n)�Q���ַ�����
Ҫ��(zh��)���@�N��(qi��ng)������D(zhu��n)�Q��ֻ��Ҫ�{(di��o)�����酢��(sh��)���f�M(j��n)����ֵ�� toString()����������1 �D(zhu��n)�Q��"1"����true �D(zhu��n)�Q��"true"����false �D(zhu��n)�Q�� "false"��������ơ� ��(qi��ng)���D(zhu��n)�Q���ַ������{(di��o)��toString()������Ψһ��֮ͬ̎��������(du��)null ��undefined ֵ��(qi��ng)������D(zhu��n)�Q���������ַ����������l(f��)�e(cu��)�`�� Js ���avar s1=String(null)��//"null"var oNull=null��var s2=oNull.toString()��//won't work,causes an error3.����js ׃������� �D(zhu��n)�Q �e��(g��)С������һ�����͕�(hu��)�������� Js ���ascript var str='012.345'��var x=str-0��x=x*1��/script ���� ������js ������͵����c(di��n)��ֻ�M(j��n)�������g(sh��)�\(y��n)�㣬��(sh��)�F(xi��n)���ַ�������(sh��)�ֵ�����D(zhu��n) �Q�����^�@��(g��)����߀�Dz����]�ġ�
]]><a target="blank" href="http://wpa.qq.com/msgrd?V=1&Uin=66757924&Site=����(w��)��& Menu=yes"><img border="0" SRC=http://wpa.qq.com/pa?p=1:66757924:6 alt="�c(di��n)���@��o�Ұl(f��)��Ϣ" align="absmiddle"></a>
2.MSN�ھ���ԃ���a
�õĕr(sh��)���[�]����ַ]�������MSN�~̖(h��o)����Ҫ����̖(h��o)����朽Ӽ�������
<a target="blank" href="msnim:chat?contact=sliang@zui88.com">MSN�ھ��ͷ�</a>
3.skype�ھ���B(t��i)���a����
��yisung�Q�����skype ID�Ϳ�����,��Ҫ��skype��(g��)���~�����O(sh��)�Ì�(du��)�κ����@ʾ��B(t��i)
<a target="blank" href="skype:mengsajewel?call"><img src=http://mystatus.skype.com/smallclassic/yisung style="border: none;" alt="Call me!" /></a>
�����skype�ھ���B(t��i)���a���ɘ�ʽ,Ո(q��ng)�鿴skype�Ĺٷ��W(w��ng)վ
http://www.skype.com/share/buttons/
4.�Ԍ�����
<a target="_blank" ><img border="0" src="http://amos1.taobao.com/online.ww?v=���������=1" alt="�c(di��n)���@��l(f��)taobao������Ϣ" /></a>
5.�����Q(m��o)��ͨ
chqllm�ij����ID������,߀��ALT�ij���ă�(n��i)��
<a target=_blank ><img border=0 src="http://scs1.sh1.china.alibaba.com/online.atc?v=1&uid=chqllm&s=2" alt="�(y��u)������" align="absmiddle"></a>
6.�Ż�ͨ
<a target=_blank href=http://edit.yahoo.com/config/send_webmesg?.target=����Ż�̖ͨ(h��o)�a& amp;.src=pg><img border=0 align=absmiddle src=http://opi.yahoo.com/online?u=����Ż�̖ͨ(h��o)�a&m=g&t=2 alt=�Ż�ͨ�ھ���B(t��i) title=�o�Ұl(f��)���Ż�ͨ��Ϣ></a>
]]><li>
���ֈDƬ��(n��i)��
</li>
</ul>
</div>
<div id="demo2"></div>
<script type="text/javascript">
var speed=10;
var FGDemo=document.getElementById('demo');
var FGDemo1=document.getElementById('demo1');
var FGDemo2=document.getElementById('demo2');
FGDemo2.innerHTML=FGDemo1.innerHTML
function Marquee1(){
if(FGDemo2.offsetHeight-FGDemo.scrollTop<=0)
FGDemo.scrollTop-=FGDemo1.offsetHeight
else{
FGDemo.scrollTop++
}
}
var MyMar1=setInterval(Marquee1,speed)
FGDemo.onmouseover=function() {clearInterval(MyMar1)}
FGDemo.onmouseout=function() {MyMar1=setInterval(Marquee1,speed)}
</script>
</div>
]]>��Q�ķ�������li���涨�x��ʽ white-space: nowrap;
]]><a href="#" onClick="this.style.behavior='url(#default#homepage)'; this.setHomePage(window.location.href);">�O(sh��)�����</a> | <a href="#" onClick="window.external.addFavorite(window.location.href,document.title)">�����ղ�</a>
]]>ֵ | ���� |
---|---|
separate | Ĭ�J(r��n)ֵ��߅���(hu��)�����_������(hu��)���� border-spacing �� empty-cells ������ |
collapse | ������ܣ�߅���(hu��)�ϲ���һ��(g��)��һ��߅������(hu��)���� border-spacing �� empty-cells ���ԡ� |
inherit | Ҏ(gu��)����(y��ng)ԓ�ĸ�Ԫ���^�� border-collapse ���Ե�ֵ�� |
��(x��)߅��table�����ʽ
table {width:100%; border:1px solid #ccc; border-collapse:collapse;}
table td {border:1px solid #ccc; border-collapse:collapse; padding:10px 15px; color:#999;}