2014-05-23 2 views

답변

1

방화범 내에서 명령을 실행하려면 당신은 Console panel 내에있는 Command Line을 사용할 수 있습니다) 명령 줄의 오른쪽에 :

Command Editor in Firebug 2.0

-1

당신은 단지 "콘솔"탭을 클릭해야합니다.

Command Line in Firebug 2.0

는 더 이상 스크립트를 들어 당신이 작은 화살표를 통해 활성화 할 수 있습니다 Command Editor을 사용할 수 있습니다 (Command Editor toggle button :

+0

실제로는 올바르지 않습니다. 아래 답변을 참조하십시오. –

+0

왜 잘못 되었습니까? "콘솔"탭에는 실행할 자바 스크립트 코드를 입력 할 수있는 텍스트 상자가 있습니다. 아래에는 답변이 없습니다. – prq

0

OK, I t 이것이 실제 답변이라고 생각해보십시오. 완벽하지는 않지만 대부분의 경우 작동합니다 :

방화범이 치고 "스크립트"탭 (콘솔이 아님)을 클릭하십시오. 선택되지 않은 경우 오른쪽에있는 "Watch"를 클릭하고 New watch expression ...을 클릭하십시오 - ONE LINE of javascript를 실행할 수있는 입력 행을 얻을 것입니다 ... 내가 정말로 원하는 것은 아니며 설계되었습니다. 순서대로 실행을 계속합니다.

즉석에서 함수를 작성한 다음 테스트하려는 경우에는 작동하지 않습니다. 그래서 나는 다음과 같은 코딩을 겸손하게 제안합니다 :

<script type="text/javascript" language="javascript"> 
$(document).ready(function(){ 
$('#indicator').click(function(){ 
var state=$('#jsConsole').attr('class'); 
$('#jsConsole').attr('class', state=='jscon'?'jscoff':'jscon'); 
}); 
}); 
function jsEval(x){ 
try{ 
eval(document.getElementById(x).value); 
}catch(e){ 
var v1=''; var v2=''; var v3=''; var str=''; var descr=false; 
for(j in e){ 
if(j=='stack' || j=='number')continue; 
if((j=='message' || j=='description') && descr)continue 
if(j=='description' || j=='message')descr=true; 
str+=(j+': '+e[j])+"\n"; 
} 
if(str) alert(str); 
} 
return false; 
} 
</script> 

<textarea id="test" class="tw" rows="3" name="test"></textarea> 
<br> 
<input type="button" onclick="jsEval('test');" value="Test" name="Submit"> 
관련 문제