0

当我单击#screenrId 时,它会提交默认数据,而没有时间添加用户输入的新数据。如何在添加表单输入字段数据之前等待追加数据?

http://jsfiddle.net/XVCVE/1/

<script type="text/javascript">    
$(document).ready(function() {      
    Screenr.Recorder( { subject:""}).appendTo("screenrId");        
});        
</script>     
<form>    
    <h4>Subject <input name="subject" id='subject' type="text" ></h4>
</form>
<div id="screenrId" ></div>   

我正在尝试在添加表单数据之前将其添加到 screen.recorder 函数?Screenr.Recorder( { subject:""})

4

1 回答 1

0

很确定我刚刚修复了它:http: //jsfiddle.net/XVCVE/3/

问题:

  1. jsfiddle 中的“javascript”部分假定为原始 javascript,没有<script>标签,所以我将该代码移到顶部。
  2. 您有一种非常奇怪的方法来确保使用正确的 HTTP 协议(​​HTTP 或 HTTPS)来加载 3rd 方库,如果您不编写http:or ,浏览器会自动执行此操作https:

在那之后,按钮在稍许延迟后出现。

于 2012-05-16T05:07:56.283 回答