V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐关注
Meteor
JSLint - a JavaScript code quality tool
jsFiddle
D3.js
WebStorm
推荐书目
JavaScript 权威指南第 5 版
Closure: The Definitive Guide
Gem

Chrome 开发者工具中的 console,怎么做到换行不用按下 shift 键?

  •  
  •   Gem · Aug 27, 2015 · 8724 views
    This topic created in 3906 days ago, the information mentioned may be changed or developed.
    在 Console 面板下,例如输入以下代码:

    function Car (color, title ){
    this.color = color;
    this.title = title;
    if (typeof Car._initialized == "undefined") {
    Car.prototype.start = function (){
    alert ("Bang!!!");
    };
    Car.prototype.material = "steel";
    Car._initialized = true;
    }
    }

    上面代码的每一行结束,开始下一行的时候,需要按下 shift 键,才能保持代码连续性,请问是不是可以在哪里设置一下,可以不用按下 shift ,保持代码的连续性。
    5 replies    2015-08-28 08:17:26 +08:00
    BRKA
        1
    BRKA  
       Aug 27, 2015
    在编辑器里写好了贴进 console 里不就好了
    colorsand
        2
    colorsand  
       Aug 27, 2015
    Chrome 没有多行模式。
    LancerComet
        3
    LancerComet  
       Aug 27, 2015
    楼主可以用 IE 和 Edge 的控制台,记得展开后回车换行。
    yeyeye
        4
    yeyeye  
       Aug 28, 2015
    @colorsand 按住 shift 按回车就是多行了 楼主都提示你看还说没有
    popok
        5
    popok  
       Aug 28, 2015
    按个 shift 有这么累吗
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4075 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 00:52 · PVG 08:52 · LAX 17:52 · JFK 20:52
    ♥ Do have faith in what you're doing.