2013-12-12 256 views
-2
var msg = '<!-- Get Used Parts Code for Mobile Website Redirection -->' + "\n"; 
msg += '<script type="text/javascript" src="http://www.google.com/global?accountId={!Account.Id}"></script>' + "\n"; 
msg += '<!-- End of Get Used Parts Code for Mobile Website Redirection -->'; 
alert(msg); 

此消息顯示在警報框中。 如何在Visualforce頁面中顯示消息。顯示警告消息

目前得到

Error: The element type "apex:page" must be terminated by the matching end-tag `"</apex:page>"`. 

回答

0

錯誤消息試試這個:

Visualforce頁面:

<apex:pageMessages /> 

的Apex控制器:

ApexPages.Message alertMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Error Message.'); 
ApexPages.addMessage(alertMsg); 
+0

我已修改的消息。你可以請看這個。 –