iframe : handle onkeypress event

**first code** var my_iframe = document.getElementById("my_iframe"); my_iframe.contentDocument.head = ""; my_iframe.contentDocument.body = ""; Giving me an error `my_f` undefined function. As I have inspected html element in firebug, found that **my_f function** is defined in javascript tag inside the head of iframe. could someone guide me, how can handle onkeypress event on input here inside iframe. And what is wrong here? ------------------ **second code** :: this worked: my_iframe.contentDocument.body = ""; but question here is what is the problem in **first code**;
should be

以上就是iframe : handle onkeypress event的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准