
Web
一棵随风倒的小小草
这个作者很懒,什么都没留下…
展开
-
jquery的ajax和getJson跨域获取json数据
转载自:很多开发人员在使用jquery在前端和服务器端进行数据交互,所以很容易会认为在前端利用jquery就可以读取任何站点的数据了。近日在进行开发时,因为要和第三方公司的一个项目进行数据的共享,因为考虑多不占用服务器的资源,遂决定直接在html进行数据的读取,不走服务器端进行中转了。然后正好就遇到了浏览器端跨域访问的问题。跨域的安全限制都是指浏览器端来说的,服务器端不存在跨域安全转载 2015-06-04 13:11:51 · 812 阅读 · 0 评论 -
AngularJs页面传参的几种方式
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。作者:Ye Huang链接:http://www.zhihu.com/question/33565135/answer/69651500来源:知乎Angular页面传参有多种办法,我列举4种最常见的(请在网页版知乎浏览答案):1. 基于ui-router的页面跳转传参(1) 在Angular转载 2015-12-04 15:23:27 · 2310 阅读 · 0 评论 -
jQuery scrollTo
原文地址:http://lions-mark.com/jquery/scrollTo/.scrollTo()Categories: Manipulation > Style Properties.scrollTo( target, options, [, complete] )Returns: jQueryDescription: S转载 2015-12-03 21:31:10 · 1656 阅读 · 0 评论 -
PHP获取通过windows系统命令wmic获取MAC地址、cpu序列号、主板序列号
PHP获取通过windows系统命令wmic获取MAC地址、cpu序列号、主板序列号源码如下:class HardwareInfo{ //获取MAC地址 function getMacAddress() { $return_arry = array(); @exec("wmic nicconfig get macaddress",原创 2015-09-25 15:35:58 · 5082 阅读 · 0 评论 -
js引用另一个js文件的方法
原文链接:http://stackoverflow.com/questions/4634644/how-to-include-js-file-in-another-js-file 首先需要明确一点:只能在html页面中引入JavaScript文件。因此,我们只能够通过往页面中写入标签的方式实现在js中引入另一个js文件。 引入文件的示例:var imported =do翻译 2015-10-28 14:50:55 · 2524 阅读 · 0 评论 -
Lnmp修改php.ini配置以及使exec()函数可用
要在lnmp系统里面修改php.ini配置,首先要用find命令查找到php.ini所在位置:find / -name php.ini查找结果如下:usr/local/php/etc/php.ini然后用VI命令修改:vi /usr/local/php/etc/php.ini修改后要重启才能生效,这里的重启并不是重启nginx-一定要注意。如转载 2015-09-22 09:20:17 · 6746 阅读 · 0 评论 -
使用JavaScript打印iframe内容的方法
index.html: var iframe = document.getElementById('frame'); iframe.contentWindow.focus(); iframe.contentWindow.print();test.html 打印网页中iframe内容原创 2015-11-11 14:36:54 · 16883 阅读 · 3 评论 -
解决Warning: scandir() has been disabled for security reasons in…的问题
转载自:http://www.xker.com/page/e2013/1126/130258.html今天改了一下博客主题,结果在编辑主题的时候出现了Warning: scandir() has been disabled for security reasons in /home/wwwroot/…Warning: Invalid argument supplied for转载 2015-09-22 09:41:06 · 6008 阅读 · 0 评论 -
Sending parameters to another web page(网页间的参数传递)
How to pass parameters to a web page?For this purpose a form is created whose values will be transmitted automatically, and in the target page, a script retrieves the values sent.We have seen how转载 2015-09-01 08:22:37 · 643 阅读 · 0 评论 -
JQuery获取并解析php返回的json格式数据的简单示例
test.html示例如下: "en"> "UTF-8"> Test "btnTest">获取JSON 从服务器获取的JSON: "spanShowJson">/span>div> "text/javascript" src="jque原创 2015-10-22 13:24:01 · 4340 阅读 · 0 评论 -
Nodejs找不到static方法
问题解决方法参考链接:http://stackoverflow.com/questions/24346161/nodejs-connect-cannot-find-static这个问题是我在学习AngularJS,也就是做《AngularJS高级程序设计》(Adam Freeman著)这本书上第一章的例子时遇到的。原文服务器端代码如下:var connect = requi原创 2015-09-07 10:07:06 · 2345 阅读 · 0 评论 -
开发中遇到的CSS相关问题及解决
1.禁用一个连接(a标签):.not-active { pointer-events: none; cursor: default;}原创 2015-08-20 13:40:19 · 411 阅读 · 0 评论 -
javascript打印网页的特定内容(以打印table为例)
参考网址:http://stackoverflow.com/questions/21375398/how-to-print-table-using-javascripthttp://stackoverflow.com/questions/2555697/window-print-not-working-in-iehtml>html lang="en">head> meta c原创 2015-09-06 13:33:05 · 11860 阅读 · 2 评论 -
服务器软件相关问题
1、设置XAMPP字符集在my.ini中的[mysqld]添加:character_set_server = utf8原创 2015-08-27 19:02:59 · 429 阅读 · 0 评论 -
学习老外用webstorm开发nodejs的技巧--代码提示DefinitelyTyped
转载自:http://my.oschina.net/klausgao/blog/380351最近入了nodejs的坑,作为老码农,js对我来说还是很容易的。webstorm虽说用得不多,但是pycharms我是老手了,idea的东西一脉相承,想想也就那样了。但是自从看了某个视频后,觉得毕竟老外就是牛啊。先发视频“WebStorm - MEAN Stack Wal转载 2015-07-06 08:48:21 · 906 阅读 · 0 评论 -
PHP - Sessions
转载自:http://www.tutorialspoint.com/php/php_sessions.htmAn alternative way to make data accessible across the various pages of an entire website is to use a PHP Session.A session creates a fil转载 2015-07-10 16:26:52 · 542 阅读 · 0 评论 -
Capturing Webpage Screenshot with Html2Canvas.js(使用Html2Canvas生成网页快照)
转载自:http://www.ayobamiadewole.com/Blog/Capturing-Webpage-Screenshot-with-Html2CanvasIntroductionRecently, I was to implement a web application requirement that stipulates that the screen转载 2015-07-03 08:41:30 · 1744 阅读 · 0 评论 -
为Bootstrap模态对话框添加拖拽移动功能
请自行下载使用到的Bootstrap库及jQuery库html>html>head lang="en"> meta charset="UTF-8"> title>title> link href="bootstrap.min.css" media="screen" rel="stylesheet">head>body>button type="butt原创 2016-01-29 16:06:10 · 20830 阅读 · 1 评论