摘要: 1.为什么出现跨域: 前端和后端同一个项目下,ajax请求的地址是localhost同一个端口是话,是不会出现跨域问题的,所以相反前端和后端分开时,ajax请求的地址或者端口不是跟后台相同时就会出现跨域问题。 2.常见请求错误: 第一种:后端处理就可以解决跨域问题,举例如下 一看这个ajax的方法就 阅读全文
posted @ 2017-11-09 11:56 Alvin-fan 阅读(728) 评论(0) 推荐(1) 编辑
摘要: 很多时候我们做项目都是已一个团队一起开发,所以我们可以选择SVN开发工具。 一:了解SVN的使用流程: 1).有一个服务端,他可以在上面添加一个项目,添加成员 2).myeclipse需要安装svn的服务,也就是你的myeclipse需要绑定 通过以上的流程了解,下面是实现myeclipse使用SV 阅读全文
posted @ 2016-04-21 10:01 Alvin-fan 阅读(324) 评论(1) 推荐(0) 编辑
摘要: ### The error may exist in SQL Mapper Configuration ### Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException: Document root eleme... 阅读全文
posted @ 2016-04-19 11:40 Alvin-fan 阅读(2337) 评论(0) 推荐(0) 编辑
摘要: public string getOrderTracesByJson() { string ApiKey = "XXXXXXXXX";//请把XXXXXX修改成您在快递100网站申请的APIKey string typeCom = "zh... 阅读全文
posted @ 2016-01-14 10:01 Alvin-fan 阅读(931) 评论(0) 推荐(0) 编辑
摘要: 1.在控制器里引用using System.Transactions;2.在你需要事务回滚的地方外面套一层using (TransactionScope sc = new TransactionScope()){}using (TransactionScope sc = new Transactio... 阅读全文
posted @ 2015-12-28 10:20 Alvin-fan 阅读(4984) 评论(3) 推荐(0) 编辑
摘要: 操作Cookie是为了短暂的保存一些东西,你可以选择用JS操作,也可以选择后台的Cookie操作,后台操作Cookie在JS里面也是可以获取到cookie// 添加cookiefunction addCookie(productid, photo, content, price, name) { ... 阅读全文
posted @ 2015-11-23 18:07 Alvin-fan 阅读(411) 评论(0) 推荐(0) 编辑
摘要: public ActionResult Index() { /*第一种,利用Google的smtp来发送邮件*/ SmtpClient client = new SmtpClient("smtp.163.com", 25); ... 阅读全文
posted @ 2015-11-12 16:43 Alvin-fan 阅读(1373) 评论(1) 推荐(0) 编辑
摘要: 从数据库查询出来的值,如果包含html标签并且通过MVC绑定页面的话,那么他会通过浏览器编译为字符串显示,所以我们有得在从新的转一次:HtmlString hh = new HtmlString(Model.content); @hh; 阅读全文
posted @ 2015-11-06 10:39 Alvin-fan 阅读(194) 评论(0) 推荐(0) 编辑