这是我上传excel文件的html代码
<span class="control-fileupload" >
<label for="file1" class="text-left">{{filePlaceHolder}}</label>
<input type="file" id="file1" value="" (change)="openFile($event)" >
</span>
Run Code Online (Sandbox Code Playgroud)
但问题是,如果我上传两次相同的文件,则更改功能不会再次执行,因为输入字段没有变化.
假设我已经上传了一次abc.xls文件,并且对此文件进行了一些验证,如果我更改了abc.xls的内容并重新上传它,那么更改函数不再重新验证它.
每次上传文件时我应该对工作更改功能做出哪些更改,无论文件名是否相同.
我想知道如何在类型脚本中编写此单击函数,因为我是新手.
点击一个按钮即可弹出.我想要实现的是当它到达我的网站的菜单时停止滚动这个弹出窗口.
这是我的代码
<div id="dialog_box" class="dbox" style="display: none; position: fixed;
right: 192px ! important; z-index: 1000; top: 0px;">
Run Code Online (Sandbox Code Playgroud)
我想在使用jquery或java脚本到达#menu id div时停止滚动#dialog_box.
到目前为止我已经尝试了这个但是没有用
jQuery(window).scroll(function(){
jQuery('#dialog_box').scrollTo('#menu'); // i would like to stop scrolling of dialog_box when it meet the #menu id div.
jQuery("#dialog_box").css("top", Math.max(0, 162 -
jQuery(this).scrollTop())); // i have tried this to position dialog_box from top but its not giving me the exact result.
});
});
Run Code Online (Sandbox Code Playgroud)