jstl与javascript高分答题急!!!!!!!!!!!!!!!!!
function   a(str,int){ 
 	if(str.length> int){ 
 		str=str.substring(0,int)+ '... '; 
 	} 
 document.writeln(str); 
 alert(str); 
 } 
 我有一个javascript方法想把 <c:out   value= "${obj.id} "/> 所得到的内容设置到function   a()方法的的str中,请问怎么办? 
 本人写的是    <script> a( <c:out   value= "${obj.id} "/> , '2 '); </script>  
 请问各位高手怎么办
------解决方案--------------------  function a(str,int){ 
 	if(str.length> int){ 
 		str= <c:out value= "${obj.id} "/> ; 
 	} 
 document.writeln(str); 
 alert(str); 
 } 
------解决方案-------------------- "abcd ".substring(0,3) 
------解决方案--------------------up
------解决方案--------------------up