2014-10-06 69 views
0

根據以下關於警報問題的建議,我在我的Web應用程序中添加了自定義警報。它在iOS7設備中工作正常,但在iOS8設備上,它以粗體顯示消息。如何取消提醒訊息?

是否可以在沒有BOLD的情況下顯示消息字體?

請查看附件截圖供您參考。

Change JavaScript alert dialog title in iOS

代碼片段:

function alert2(words){ 
     var iframe = document.createElement("IFRAME"); 
     iframe.setAttribute("src", 'data:text/plain,'); 
     document.documentElement.appendChild(iframe); 
     window.frames[0].window.alert(words); 
     iframe.parentNode.removeChild(iframe); 
     } 

     function takePicture() { 
      alert2("Testing custom alert"); 
     } 

enter image description here

+0

你只是調用'alert(...)'?添加了 – 2014-10-06 20:53:25

+0

代碼片段。如果我只使用alert(「Test」),那麼標題將以粗體顯示,並且消息在iOS8中顯示正常。我不希望標題顯示在屏幕上 – 2014-10-06 21:01:36

+0

Marc B,有什麼想法? – 2014-10-07 19:57:30

回答

-2

不,你不能將它的操作系統或瀏覽器相關的但你可以使自己的彈出框,這也是很容易