草庐IT

domain_host

全部标签

javascript - 如何在 Windows Script Host 中使用 jQuery?

我正在编写一些需要解析大量包含HTML片段的文件的代码。jQuery似乎对此非常有用,但是当我尝试将jQuery加载到WScript或CScript之类的东西时,它会抛出错误,因为jQuery对窗口对象有很多引用。在没有浏览器运行的代码中使用jQuery的实用方法是什么?更新:作为对评论的回应,我已经成功编写了JavaScript代码来使用newActiveXObject('Scripting.FileSystemObject');读取文件的内容。我知道ActiveX是邪恶的,但这只是一个内部项目,用于从一些包含HTML片段的文件中获取一些数据并将其放入适当的数据库中。另一个更新:我的

javascript - 哪个更好 : public javascript CDN or self-hosted combined javascript?

关闭。这个问题是opinion-based.它目前不接受答案。想要改进这个问题?更新问题,以便editingthispost可以用事实和引用来回答它.关闭8年前。Improvethisquestion我的网页使用了几个javascript库,如jquery、jquery-ui、underscore、backbone和其他一些著名的jquery插件。现在我面临两难境地,我可以:使用托管所有这些库的公共(public)CDN。如果用户使用相同的CDN访问过另一个站点,则脚本可能已被缓存。但是由于每个库都是独立的,页面需要包含很多脚本标签,因此会有很多http请求。将所有必需的脚本合并为一个

javascript - iframe contentWindow 在缩短 document.domain 后抛出拒绝访问错误

我通过以下方式动态创建IFRAME:varwrapUpIframe=document.createElement("iframe");wrapUpIframe.id='WrapUpDialog3';wrapUpIframe.src='WrapUpDialog.html';document.body.appendChild(wrapUpIframe);在动态创建之后,我的document.domain正在从Servername.dc.com缩短为仅dc.com,但是当我尝试访问contentWindow时,我得到了一个Accessisdenied错误:document.getElemen

javascript - "Protocols, domains, and ports must match"问题

当我在控制台上查看时,我的网站有这些错误消息。谁能告诉我通常导致这些错误消息的问题是什么?Blockedaframewithorigin"mysite"fromaccessingaframewithorigin"facebook".Theframebeingaccessedset"document.domain"to"facebook",buttheframerequestingaccessdidnot.Bothmustset"document.domain"tothesamevaluetoallowaccess.contentscript_siteoverlay_bin.js:78B

javascript - react 门户 : host multiple inside same domNode parent?

React最近添加了Portal功能,有效地剥离虚拟DOM的子树并将其放置在物理DOM中的其他位置。render(){//Reactdoes*not*createanewdiv.Itrendersthechildreninto`domNode`.//`domNode`isanyvalidDOMnode,regardlessofitslocationintheDOM.returnReactDOM.createPortal(this.props.children,domNode,);}文档不清楚是否每个门户都必须存在于自己的domNode中。注意:截至2017年2月11日的当前实现确实允许

javascript - 谷歌浏览器插件 : How to get domain from URL (tab. 网址)

使用GoogleChromeAPI的tab.urlvalue,从整个值中获取域的最佳方法是什么?在JavaScript中,我会使用window.location.protocol和window.location.hostname。例如这样的事情:vardomain=window.location.protocol+"//"+window.location.hostname;但是那获取的是扩展域而不是选项卡,所以不能使用该方法。因此,使用类似于下面的函数...我如何从tab.url值中删除域?functionshow_alert(){chrome.tabs.getSelected(nul

javascript - 即使正确设置了 document.domain,跨子域 ajax 请求也被拒绝

在我的应用程序中,我在一个子域(dev.u413.com)上有一个网站,我使用jQuery向另一个子域(api.u413.com)上的JSONapi发出ajax请求。当我检查Chrome开发工具和FirefoxFirebug中的请求时,我的请求似乎被Access-Control-Allowed-Origin阻止了。我将document.domain设置为当前域的后缀:document.domain='u413.com';。这是我的要求:$.ajax({dataType:'json',data:{parseAsHtml:true,cli:'help'},url:'http://api.u

javascript - 设置 document.domain 是否适用于所有(大多数)浏览器?

SameOriginPolicyDocumentation是这样说的:Thereisoneexceptiontothesameoriginrule.Ascriptcansetthevalueofdocument.domaintoasuffixofthecurrentdomain.Ifitdoesso,theshorterdomainisusedforsubsequentoriginchecks.Forexample,assumeascriptinthedocumentathttp://store.company.com/dir/other.htmlexecutesthefollowin

php - SOAP 错误 fatal error : Uncaught SoapFault exception: [HTTP] Could not connect to host

我在使用PHPSoapClient发送SOAP请求时遇到此错误:Fatalerror:UncaughtSoapFaultexception:[HTTP]Couldnotconnecttohostin/var/www/phpwebservice/soap-client.php:6Stacktrace:#0[internalfunction]:SoapClient->__doRequest('__call('getCatalogEntry',Array)#2/var/www/phpwebservice/soap-client.php(6):SoapClient->getCatalogEnt

php - SMTP 错误 : Could not connect to SMTP host. 邮件程序错误:SMTP 错误:无法连接到 SMTP 主机

大家好,我是php和html新手,面临问题:SMTP错误:无法连接到SMTP主机。邮件程序错误:SMTP错误:无法连接到SMTP主机。但在本地xampp中工作正常,在服务器中出现错误。代码如下:Name:$nameContact:$contactEmail:$emailCompany:$companyMessage:$message";require_once('mailer/class.phpmailer.php');$mail=newPHPMailer();$mail->IsSMTP();$mail->Host="smtp.gmail.com";$mail->SMTPDebug=0