草庐IT

page_params

全部标签

javascript - node_modules 文件夹上的 Github Pages 404

我正在尝试使用GitHub页面使用JavaScript在发布者-订阅者模块上呈现我的GitHub存储库。gh-pages分支看起来不错。但是,mustache代码不会呈现在我在GitHubPages上的项目中。它看起来像这样:GitHub存储库:https://github.com/ajhalthor/pubsub-application此项目的Github页面repo:https://ajhalthor.github.io/pubsub-application/GitHub存储库也有node_modules文件夹,所以它应该是自给自足的。Mustache、jQuery和Bootstr

javascript - "JavaScript placed at the end of the document so the pages load faster"是吗?

这个问题在这里已经有了答案:关闭9年前。PossibleDuplicate:Javascriptonthebottomofthepage?我在一些推特Bootstrap示例中看到了一条评论。它说JavaScriptplacedattheendofthedocumentsothepagesloadfaster这是真的吗??如果是,那么它是如何工作的??

javascript - Protractor 和 Angular : How to test two pages in an app, 一个接一个?

我想在我的Angular应用程序的两个单独页面上运行Protractor测试:/dashboard和/articles。复杂的是我必须手动登录应用程序。目前我有这个设置:varLoginPage=function(){ptor=protractor.getInstance();this.login=function(url){ptor.get(url);ptor.findElement(protractor.By.model('email')).sendKeys(config.LOGIN_EMAIL);ptor.findElement(protractor.By.model('pass

javascript - 如何从 saga 获取 action.params

我正在使用redux-saga。在代码yield*ReduxSaga.takeEvery('MY_ACTION',updatePorts);中,我如何访问action以获取其字段。例如我有一个Action创建器:functionstatus(){type:'MY_ACTION',status:true}如何从我的saga访问action.status?还是我必须仅通过getState()和select访问数据?? 最佳答案 constactionCreator=()=>({type:'MY_ACTION',status:true})

javascript - 卡斯珀JS : Why does my url change to about:blank when my page is loaded?

我是PhantomJS/CasperJS的初学者。我只想启动一个session并验证它是否正常。这是我的代码:varcasper=require('casper').create({verbose:true,logLevel:'debug',pageSettings:{loadImages:false,loadPlugins:false,userAgent:'Mozilla/5.0(WindowsNT10.0;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/39.0.2171.71Safari/537.36Edge/12.0'}});ca

javascript - Firefox 扩展和 XUL : get page source code

我正在开发我的第一个Firefox扩展,为此我需要获得当前页面的完整源代码。我如何使用XUL做到这一点? 最佳答案 你需要一个xulbrowser将内容加载到的对象。将页面的“view-source:”版本加载到浏览器对象中,其方式与“ViewPageSource”菜单相同。请参阅chrome://global/content/viewSource.js中的函数viewSource()。该函数可以从缓存中加载,也可以不加载。内容加载后,原始来源由:varsource=browser.contentDocument.getElemen

javascript - 实现 "this page is asking you to confirm that you want to leave"

这是当我想离开某些页面时Firefox发出的警告。根据我在上面看到的页面以及当我在填写表格后尝试关闭页面时出现此警告,我只能假设它在动态页面上工作。哪种技术用于实现此功能?我如何在一个简单的hello-world页面上自己实现它? 最佳答案 您基本上为beforeunload事件实现了一个处理程序。这使您可以警告用户他们有未保存的数据。伪代码:window.onbeforeunload=functionwarnUsers(){if(needToConfirm){//checktoseeifanychangestothedataent

javascript - knockout : How to filter observableArray by param

这是代码:http://jsfiddle.net/Gr3fT/1/如何通过role属性过滤personRoles?每个列表必须只有自己的role项。谢谢。 最佳答案 此功能有效(基于http://knockoutjs.com/examples/animatedTransitions.html:)get:function(role){returnko.dependentObservable(function(){returnko.utils.arrayFilter(this.personRoles(),function(item){r

javascript - Highcharts 错误 #16 : charts not showing on the same page

我有一个网站,其中一个页面我已经成功添加了一张Highcharts。现在我将完全相同的代码复制到同一页面,但不同的asp页面,但是第一个图表消失了,第二个图表没有显示。它给我一个错误:UncaughtHighchartserror#16:www.highcharts.com/errors/16highcharts.js:16UncaughtSyntaxError:UnexpectedtokenILLEGALDashboard.aspx:657UncaughtTypeError:Object[objectObject]hasnomethod'highcharts'Dashboard.as

javascript - react this.props.params undefined

我无法通过id到我的产品页面,我尝试了所有方法并搜索了答案,但它仍然不起作用。这是我的index.js:importReactfrom"react";import{render}from"react-dom";import{Router,Route,IndexRoute,hashHistory}from"react-router";import{Menu}from'./components/Menu';import{MainPage}from'./components/MainPage';import{DetailsProduct}from'./components/DetailsPr