草庐IT

target_state

全部标签

html - 为什么我的 :active selector lose its click event state on scale tranformation?

我为网站设计了一个按钮,并尝试在点击事件上添加transform:scale(0.95);(使用:activateCSS选择器)。a.btn,input[type="submit"].btn,label.btn,button.btn{text-transform:uppercase;border:solid1px#282828;font-size:11px;line-height:17px;}a.btn:active,input[type="submit"].btn:active,label.btn:active,button.btn:active{transform:scale(0.

html - 未弃用的 <form target ="...">

我想达到和...一样的效果window.open('lalala.php','lalala','...');但是我想发送HTTPPOST请求而不是HTTPGET请求。因此,我正在使用以下内容:$('').attr('action','lalala.php').attr('target','lalala')//w3schools.orgsaysthisisdeprecated.attr('method','post').append(hiddenParam('param1',param1)).append(hiddenParam('param2',param2)).submit().re

javascript - react - Uncaught Error : Target container is not a DOM element

我是新手。我的错误是:UncaughtError:TargetcontainerisnotaDOMelement我已经用谷歌搜索了很多次并找到了有这个错误的人:UncaughtError:InvariantViolation:_registerComponent(...):TargetcontainerisnotaDOMelement.我的不包含:_registerComponent(...):这是我的文件:index.htmlReactindex.jsximportReactfrom'react';importReactDOMfrom'react-dom';ReactDOM.rend

javascript - 从 event.target 获取子元素

event.target返回执行操作的DOM元素。如何从输出中获取特定的子元素?这是我的表单(带有Angular标记):ExamplefileinputSubmit它触发函数:onSubmit(event){console.log(event.target);}输出整个表单。我需要访问onSubmit()函数中的input元素。 最佳答案 您可以使用documentElement.querySelector()方法。functiononSubmit(event){console.log(event.target.querySelec

html - replaceState() : a history state with url . .. 无法在具有来源的文档中创建

我有window.history.replaceState(null,null,'about');在main.js位于required/javascripts在我的服务器上。然后在关于页面(位于我服务器上的/(根目录))上,我有一个使用window.history.replaceState(null,null,'about:me');的链接在本页面。一切正常,但是当我单击另一个具有相同功能但带有about:girlfriend的链接时作为URL,我收到此错误消息:UncaughtSecurityError:Failedtoexecute'pushState'on'History':Ah

javascript - Jquery - event.target 和 this 关键字之间的区别?

event.target和this有什么区别?假设我有$("test").click(function(e){$thisEventOb=e.target;$this=this;alert($thisEventObj);alert($this);});我知道警报会弹出不同的值。任何人都可以解释其中的区别吗?非常感谢。 最佳答案 如果您单击事件所关联的元素,它们将是相同的。但是,如果您单击一个子并且它冒泡,那么this引用此处理程序绑定(bind)到的元素,并且e.target仍然引用事件起源的元素。你可以在这里看到区别:http://

html - 推特 Bootstrap : Why the z-index: 2 for some states?

我将TwitterBootstrap用于我的移动Web应用程序。当某些图层滑入或滑出视口(viewport)时,某些图层会与其他图层重叠。在这些情况下,这些层上的z-index起着至关重要的作用。通常,由于使用z-index:2,我的z顺序布局完美的屏幕会乱序,例如bootstrap.css中的以下样式:.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-ver

jQuery Target 类分开

我有这样的HTML代码。123456789981251100051036626016165656我希望Jquery将时间字符串更改为日期25March201728April201714January201721December2015为此我使用了这个Jquery代码:functiontimestr_to_date(time_string){//thisfunctionwillconvertthetimestringtodate}$(document).ready(function(){//gettingthetimestringvartime_string=$('.time_strin

html - 如何在IE9中访问Event.target?

HTMLDOM对象模型定义了一个Event对象withatargetproperty.查看MSDN,Microsoft文档targetproperty.他们还记录了srcElement作为早期版本的InternetExplorer中target的别名:ThetargetpropertyissimilartosrcElementinWindowsInternetExplorer8andearlierversions.所以我在InternetExplorer中,位于click断点处:functiondivClick(sender){vardivCell=sender;在F12工具控制台,我

javascript - input 的 event.target 在 this.setState [React.js] 中为 null

在我的react组件中,我有一个文件输入:`我的onFileChange是:onFileChange(e){letfile=e.target.files[0];this.setState(()=>({file:e.target.files[0]}));//doesntwork//this.setState(()=>({file}));//works//this.setState({file:e.target.files[0]});//works}第一种设置状态的方法失败并出现错误:Cannotreadproperty'files'ofnullReact还会给出以下警告:Thissynt