blackcore

本质的东西,深植于骨骼,扎根于灵魂! 淘实惠,各类电子版书籍

导航

随笔分类 -  JavaScript

mysql 导出表结构
摘要:直接使用mysqldump命令即可Win+R,输入cmd,回车执行命令mysqldump mytest -uroot -pmysqlroot -d > C:\createSql.sql回车即可。mytest是库名;-d表示只导出表结构;输出脚本文件至C:\createSql.sql。 阅读全文

posted @ 2012-01-06 17:45 blackcore 阅读(235) 评论(0) 推荐(0)

Excel Vba 过滤主域名
摘要:Sub FilterSiteDomain() Dim siteUrl As String Dim siteDomain As String Dim siteMainDomain As String siteUrl = "http://www.baidu.com/a/b/index.html" '获取URL域名 siteDomain = GetSiteByUrl(siteUrl) MsgBox siteDomain '获取URL主域名 siteMainDomain = GetSiteDomain(siteDomain) MsgBox s... 阅读全文

posted @ 2011-11-02 12:18 blackcore 阅读(730) 评论(1) 推荐(0)

Excel Vba 正则URL协议、域名、端口号、页面路径
摘要:打开Excel,Shift + F11 打开VBA编辑器,注意高度时必须先保存,否则会提示无法高度外部程序。Sub RegexURL()Dim url As StringDim regex As Objecturl = "http://www.baidu.com/a/b/index.html"Set regex = CreateObject("vbscript.regexp")regex.Global = Trueregex.Pattern = "(\w+)://([^/:]+)(:\d*)?([^# ]*)"MsgBox regex 阅读全文

posted @ 2011-11-01 18:45 blackcore 阅读(1229) 评论(0) 推荐(0)

javascript using the unary-plus and unary-minus operator 一元操作符
摘要:新手入门啊,看看就明白了!<script src='jquery.js'></script>......<script>var a=1;var b='2';//output numberconsole.log(typeof(-b));console.log(typeof(+b));//output stringconsole.log(typeof(b));//output 12console.log(a + b);//output 3console.log(a + Number(b));console.log(a + +b); 阅读全文

posted @ 2011-03-05 18:05 blackcore 阅读(413) 评论(0) 推荐(0)

IE8 中使用加速器(Activities)
摘要:在IE8中使用Activities感觉就是让自己使用IE更方便了,懒人就是得懒得底。在http://ie.microsoft.com/activities/zh-chs/default.aspx有对加速器的详细介绍。在http://msdn.microsoft.com/en-us/library/cc289789(VS.85).aspx也有说明。因为Activities是用XML文件来描述的,XM... 阅读全文

posted @ 2010-05-14 11:21 blackcore 阅读(441) 评论(0) 推荐(0)

限制文本框输入N个字符的使用
摘要:这里的字符指的是汉字占两个字节,而数字及其字母占一个字节,如果使用substr肯定是不可以的,所以要做的就是1.  首先区分出来是两个字节的字符还是一个字节的字符;2.  使用charCodeAt和String.fromCharCode即可进行相互转换。代码如下: 阅读全文

posted @ 2010-05-12 10:28 blackcore 阅读(405) 评论(0) 推荐(0)

javascript 中调用exe应用程序
摘要:如下代码是调用windows OS中的计算器:[代码]注:只在IE下测试通过。 阅读全文

posted @ 2009-11-11 18:18 blackcore 阅读(781) 评论(0) 推荐(0)