JavaScript
文章平均质量分 62
KyunghakPark
Kyunghak Park
Cancer A+ dragon
展开
-
JS 源代码
事件源对象 event.srcElement.tagName event.srcElement.type捕获释放 event.srcElement.setCapture(); event.srcElement.releaseCapture(); 事件按键 event.keyCode event.shiftKey event.altKey event.ctr转载 2012-10-04 16:18:38 · 1311 阅读 · 0 评论 -
JS replaceAll
String.prototype.replaceAll = function(s1,s2){ return this.replace(new RegExp(s1,"gm"),s2); } "aaa,aaa,aa,aa.".replaceAll(",","");即可使用转载 2013-02-20 14:45:46 · 462 阅读 · 0 评论 -
JS Setting and Get cookie
http://www.w3schools.com/js/js_cookies.aspWhat is a Cookie? A cookie is a variable that is stored on the visitor's computer. Each time the same computer requests a page with a browser, i转载 2012-11-27 23:03:06 · 683 阅读 · 0 评论 -
JavaScript About Popup
http://www.aspnetcenter.com/cliktoprogram/javascript/window.asp PropertyDescriptionSyntaxClosedReturns boolean value to determine if a window has been closedwind转载 2012-09-24 13:14:28 · 445 阅读 · 0 评论 -
HTML Canvas 渐变 gradation
http://www.w3school.com.cn/html5/html_5_canvas.asp 实例 - 渐变使用您指定的颜色来绘制渐变背景:JavaScript 代码:var c=document.getElementById("myCanvas");var cxt=c.getContext("2d");var grd=cx转载 2012-09-24 13:08:19 · 473 阅读 · 0 评论 -
JS 禁用 退格键 但可删除文本
http://blog.csdn.net/robin844/article/details/6820120/*禁用 退格键的后退功能,但是可以删除文本内容*/ document.onkeydown = check; function check(e) { var code; if (!e) var e = window.event;转载 2012-09-24 12:59:53 · 451 阅读 · 0 评论 -
Html Form 标签里的 input 标签 输入Enter时 防止自动submit
function check() { var a = 13; if (event.keyCode == a) { document.form1.action = ""; document.form1.submit(); } } function disableEnterKey(e) { var key; if(window.event) key = wi原创 2012-10-04 16:50:55 · 770 阅读 · 0 评论 -
Modify CSS with JavaScript
http://www.universalwebservices.net/web-programming-resources/javascript/modify-css-with-javascript Modify CSS with JavaScript======document.getElementById(id_of_element).style.j转载 2012-10-04 16:31:01 · 964 阅读 · 0 评论 -
JS about window.open();
http://www.blazonry.com/javascript/windows.php The statement used to open basic popup for Example 1 is:window.open("win1.html","Window1","menubar=no,width=430,height=360,toolbar=no");转载 2012-10-04 16:27:34 · 942 阅读 · 0 评论 -
JS Ajax Example
http://blog.naver.com/sungback?Redirect=Log&logNo=90037530980var xhr = null;function getXMLHttpRequest() {if (window.ActiveXObject) {try {return new ActiveXObject("Msxml2.XMLHTTP");/转载 2012-10-04 16:25:59 · 456 阅读 · 0 评论 -
mouse drag
New Document function aaa(){document.getElementById("myDrag").onmousedown = dragStart;document.getElementById("myDrag").onmousemove = drag;document.getElementById("myDrag")原创 2013-04-17 17:21:40 · 844 阅读 · 0 评论