div = document.getElementById('play')
iframe = document.createElement('iframe');
iframe.id='iframe_played'
iframe.width = '420'
iframe.height = '315'
iframe.src = './home.html#/video/'+ currentMarker.id
iframe.frameborder = '0'
iframe.allowfullscreen = 'true'
iframe.webkitallowfullscreen = 'true'
iframe.mozallowfullscreen = 'true'
div.appendChild(iframe);
.. 나는 그것이 슈퍼 영웅이 될 것입니다 알고 쉽게 jQuery를 사용할 수 있지만 불행히도 AngularJS가 이것을 권장하지 않기 때문에 jQuery를 가져 오지 않았습니다.
누구나 리팩토링에 대한 제안이 있습니까? (가장 좋은 방법은 모두 CSS에 넣을 수 있습니다 ..하지만 src
은 동적이어야하며 allowfullscreen
는 CSS에서 지원하지 않는 것 같습니다.) 감사합니다!
이것은 멋진 '순수한'js 코드입니다. 걱정마. – degr
http://stackoverflow.com/questions/867916/creating-a-div-element-in-jquery – degr
@degr thanks ..하지만 jQuery 라이브러리를 가져오고 싶지 않았습니다 ... –