현재 업데이트 패널이 새로 고침 될 때 JavaScript 함수를 호출하려고하지만 어떤 이유로 인해 호출되지 않고 있습니다. 나는 다른 기능을 위해 작동하는 똑같은 방법을 사용하고 있습니다.pageload에서 자바 스크립트 코드가 호출되지 않습니까? .net
C#을,이 페이지로드 이벤트에 있습니다
ScriptManager.RegisterStartupScript(
UpdatePanel1,
this.GetType(),
"Modify Map",
"modifyMap();",
true);
자바 스크립트 기능 : 누군가가 나를 도울 수 있다면
function modifyMap() {
alert(1);
//To change the map size if the user is viewing the site on a mobile.
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
//Change width/height of map.
//Change the width of the wrapper to 100% of the screen.
document.getElementById('wrapper-div').style.width = "100%";
//Set the map to fill the wrapper.
document.getElementById('canvasMap').style.width = "100%";
//Set the height of the map.
document.getElementById('canvasMap').style.height = "500px";
}
}
것은 그 좋은 것입니다.
window.onload = modifyMap;
함수 안에 넣어하지 마십시오
감사합니다,
캘럼