a problem about 'alert' in jquery mobile

a problem about 'alert' in jquery mobile

hi,all, I am a new guy who is intrested in  jquery mobile which I built a new web using it.
However,there is a problem,
I want to alert something when controller jumps a new web,but it doesn't work,the 'msg' can be shown on the web,but alert not.
If I delete this ' <script src="<%=path%>/js/jquery.mobile-1.4.4.min.js"></script> ' in the web,
it can work normally,is this a bug or I used it in a wrong way?

buy the way,it also did not work like this:
 jQuery(window).on( "pagecreate", function()
 { alert("565656---");
 alert("565656"+"${msg}"); });

win7
springmvc
jsp

java apart:
@RequestMapping("loginCheck")
public String loginCheck(HttpServletRequest request,
HttpServletResponse response, @ModelAttribute QuanerUser qUser,
ModelMap model) {
String msg = "welcome to my webApp";
model.addAttribute("msg", msg);
return QuanerView.MAINPAGE;
}

mianpage.jsp:
..
 <script> 



$(function() {
alert("565656---");
alert("565656"+"${msg}");
});

 </script>
.....
 <span id="msg"  style="color:#f00;font-size:20px ;"> ${msg } </span>