1
저는 자바 스크립트/JQuery 초보자입니다. 그래서 이것이 여러분에게 분명하기를 바랍니다. javascript/JQuery 기반의 html 문서 번역을 구현하려고합니다. 번역이 XML 문서 감안할 때 : 내 스크립트에서xml 문서에서 jQuery 추출 속성
<definitions>
<parameters>
<parameter name="misc.gain" caption="Gain"/>
<parameter name="misc.integral" caption="Integration time"/>
</parameters>
</definitions>
, 내가 번역 할 필요가있는 요소를 발견했다. 위의 문서는 xlmdocument에 있습니다.
var my_id = $(this).attr('id'); // ="misc.gain" on first iteration
// find xml node whose name is = my_id from xmldocument
// extract caption attribute from xml node
$(this).html(translatedcaption); //
누군가 나에게 힌트를 줄 수 있습니까? 나는 여기에 붙어 있습니다.
편집 : 멋진 사람이 힌트와 방향을 알려 주었지만 왜 그가 자신의 게시물을 삭제했는지 모릅니다.
내 최종 솔루션이었다 : 당신의 빠른 도움말 씨 X