에 의해 마우스의 커서를 바꿀 MS CRM 동역학 4.0, js를 사용하여에 js를 사용하여 커서를 변경하려고합니다. ajax를 사용하여 메소드를 호출 할 때 기다림으로서 마우스의 커서를 표시하려고합니다. 문서 .body.style.cursor = "wait"; 하지만 작동하지 않습니다 ... 어떻게해야합니까?js
js
답변
당신이하고있는 일이 효과가 있습니다.
cursor
이 모든 자손의 CSS에 설정된 경우 body
의 커서 설정보다 우선합니다.
또한 I는 width
및 100%
에 본체 height
연신 알.
다른 요소를 덮어 쓰는 경우 가능한 해결책이 있습니다.
당신의 CSS를이 추가 :
body.isWaiting, body.isWaiting * {
cursor:wait !important;
}
는 ... 다음을 수행하십시오
document.body.className = 'isWaiting';
예 :http://jsfiddle.net/88272/3/
당신은 브라우저 호환성을 테스트해야합니다.
편집 :
당신이 서버 측에서 자신 만의 스타일 시트를 추가 할 수없는 것처럼, 당신이 대신 자바 스크립트를 통해 하나를 추가 할 수있는 소리입니다.
예 :http://jsfiddle.net/88272/4/
// string representation of stylesheet content
var styles = 'body.isWaiting, body.isWaiting * {cursor:wait !important;}';
// grab the <head> element
var head = document.getElementsByTagName('head')[0];
// create a new "style" element, and set up its properties/content
var sheet = document.createElement('style');
sheet.setAttribute('media', 'all');
sheet.setAttribute('type', 'text/css');
if(sheet.styleSheet) {
sheet.styleSheet.cssText = styles; // For IE
} else {
sheet.appendChild(document.createTextNode(styles));
}
// append the new <style> element to the <head>
head.appendChild(sheet);
// give the <body> the class when it is needed
document.body.className = 'isWaiting';
아니요, ms crm dynamics 4.0의 사용자 지정 엔티티입니다. 현재는 다른 아이디어로 CSS를 삽입 할 수 없습니까? –
@ 대니 : 자바 스크립트를 통해 스타일 시트를 주입 할 수 있습니까? – user113716
내가 그걸 시도 할거야, 어떻게? –
- 1. js 내에 js 파일로드
- 2. JS
- 3. JS
- 4. JS
- 5. JS
- 6. JS
- 7. JS
- 8. js
- 9. JS
- 10. JS
- 11. .js 파일에 .js 파일 포함
- 12. 삽입 새 JS 방법 JS
- 13. 외부 js 파일에 .js 확장자가 있어야합니까?
- 14. 다른 js 파일의 js 파일을 어떻게 포함해야합니까?
- 15. 다른 JS 파일 및 Intellisense의 JS 파일
- 16. JS 기반 JS 편집기 (코드 완성 포함)
- 17. html.erb의 js 함수 내에서 js 함수를 사용합니다.
- 18. JS 경로는
- 19. JS - 감지
- 20. JS 라이브러리와
- 21. JS/Jquery
- 22. 는 JS
- 23. 지금 JS
- 24. jQuery를/JS :
- 25. window.location.replace JS
- 26. JS : 외부로드
- 27. 하나의 js 파일에서 다른 js 파일로 객체를 보내는 방법은 무엇입니까?
- 28. 안정적인 js-Tree PlugIn, jsTree 또는 Ext-Js 트리 검색?
- 29. 내가이 다음 이미지를 호출 기능, JS 가지고 JS 기능
- 30. js 파일을 다른 js 파일에 포함시키는 방법은 무엇입니까?
당신은 당신의 코드 중 하나를 게시 할 수 있습니까? 구문은 포함 된 한 줄로 된 것으로 보입니다. – elwyn
그것과 같은 것 : function BaforeCallingAjaxMethod() {document.body.style.cursor = "wait"; CallAjaxMethodNow();} –