小编gsc*_*ish的帖子

JSON返回[object Object]

我试图从指定的URL返回JSON数据但是当弹出警报时它只显示[object Object](我意识到对象对象实际上并不是错误).我想在警报中吐出位置名称和其他字段.我该怎么做呢?

这是我正在看的JSON的一个例子(完整文件有大约30个帖子)

[
  {
    "m_id": 473644,
    "m_positionName": "Application Monitoring Software Engineer",
    "m_positionLocations": [
      {}
    ],
    "m_active": true,
    "m_description": "Job Responsibilities:\r\n\r\n-Create world class application monitoring tools and dashboards for our health care applications\r\n\r\n-Develop business rules to pro actively identify and re-mediate system-level issues before they occur.\r\n\r\n-Create business intelligence reports for internal and external use as a supplement to software products.\r\n\r\n\r\n\r\nJob Requirements:\r\n\r\n-BS or MS Degree in computer science or any engineering discipline.\r\n-4+ years of experience with Java (or other …
Run Code Online (Sandbox Code Playgroud)

ajax jquery json

8
推荐指数
2
解决办法
4万
查看次数

Twitter引导程序,宽度> 1170px

这可能是一个愚蠢的问题,但在环顾世界各地的网站一段时间后,我找不到答案.

我正在为我的新网站使用twitter bootstrap的流体网格系统.我嘲笑主页的容器区域比twitter的默认1170px(1506px)宽.

1506px布局分解为:12列,每列98px(1176px),11个边距为30px(330px)

1176 + 300 = 1506.

那么有什么方法可以将这个宽度(1506)插入到twitter引导程序中,而不必检查一堆LESS和CSS?

css grid-layout twitter-bootstrap

1
推荐指数
1
解决办法
8331
查看次数

用\ s替换\ r \n's

我已经成功地获得了下面的JSON,但是我有一个问题,那些讨厌的正则表达式\ r \n\r \n进入<br/>'s.我目前正在使用以下代码,但它只是逃避了一些.我正在寻找替换正则表达式的所有实例,包括:\ r \n,\ r \n\r \n.我之前使用的代码是:

$('<ul class="job-listing"><li class="job-position"><h2>'+post.m_positionName+'</h2></li><li class="job-description">'+post.m_description.replace('\r\n','<br />')+'</li></ul>').appendTo('body');
Run Code Online (Sandbox Code Playgroud)

这是JSON:

[
  {
    "m_id": 473644,
    "m_positionName": "Application Monitoring Software Engineer",
    "m_positionLocations": [
      {}
    ],
    "m_active": true,
    "m_description": "Job Responsibilities:\r\n\r\n-Create world class application monitoring tools and dashboards for our health care applications\r\n\r\n-Develop business rules to pro actively identify and re-mediate system-level issues before they occur.\r\n\r\n-Create business intelligence reports for internal and external use as a supplement to software products.\r\n\r\n\r\n\r\nJob Requirements:\r\n\r\n-BS or MS Degree in computer …
Run Code Online (Sandbox Code Playgroud)

regex jquery json

0
推荐指数
1
解决办法
1万
查看次数

标签 统计

jquery ×2

json ×2

ajax ×1

css ×1

grid-layout ×1

regex ×1

twitter-bootstrap ×1