iOS 开发实用技术导航
NSHipster 中文版
http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
http://www.cocos2d-iphone.org/
CocoaPods
http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
http://code.google.com/mobile/analytics/
WWDC
https://developer.apple.com/wwdc/
Design Guides and Resources
https://developer.apple.com/design/
Transcripts of WWDC sessions
http://asciiwwdc.com
Cocoa with Love
http://cocoawithlove.com/
Cocoa Dev Central
http://cocoadevcentral.com/
NSHipster
http://nshipster.com/
Style Guides
Google Objective-C Style Guide
NYTimes Objective-C Style Guide
Useful Tools and Services
Charles Web Debugging Proxy
Smore
damngood
V2EX  ›  iDev

用js操作UIWebView页面问题

  •  
  •   damngood · Jun 3, 2011 · 6155 views
    This topic created in 5540 days ago, the information mentioned may be changed or developed.
    问大家一个问题:
    在用js去更新/替换webview某个元素的内容的时候有什么特别需要注意的问题不?
    有此一问是因为今天在做这个操作的时候没有成功。 而且还是简单的js,简单的html页面。
    3 replies    1970-01-01 08:00:00 +08:00
    damngood
        1
    damngood  
    OP
       Jun 3, 2011
    自答自答:
    应该是和load页面内容异步有关系。也就是说我在执行js得时候页面web的dom都还没有生成,所以js调用得不到任何结果。
    lldong
        2
    lldong  
       Jun 3, 2011
    或许可以在WebFrameLoadDelegate里面的webView:didFinishLoadForFrame:方法里去执行
    damngood
        3
    damngood  
    OP
       Jun 3, 2011
    @lldong 我这个问题是关于ios上的webview..你提到这两个方法应该是mac平台上的吧。 :)
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3549 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 04:43 · PVG 12:43 · LAX 21:43 · JFK 00:43
    ♥ Do have faith in what you're doing.