我有一个iframe(在我的域中),iframe有一个文件iframe.js.
我的父文档有一个文件parent.js.
我需要parent.js从一个函数中调用一个函数iframe.js.
我试过window.parent.myfunction()在parent.js文件中做这个功能.
但是,它没有用.只有当我把这个函数放在父页面上时(我的意思是在HTML中),它才有效.
知道如何让这个工作吗?
我正在使用Oracle(工作空间是TOAD),我需要创建我的字符串,如果它们被缩短然后是10个字符,那么添加前导零以使它们全部为10位数字符串.
例如,如果我有这样的字符串:'12H89'需要'0000012H89'或'1234'为'0000001234'
如何才能做到这一点?什么是最好的方式?
提前致谢 .
我有这个功能
function smth() {
var container = null;
var newContainer = null;
if (window.getSelection) { // all browsers, except IE before version 9
alert("first if");
var selectionRange = window.getSelection();
if (selectionRange.rangeCount > 0) {
var range = selectionRange.getRangeAt(0);
container = range.commonAncestorContainer;
newContainer = container;
}
}
else {
if (document.selection) { // Internet Explorer
alert("second if");
var textRange = document.selection.createRange();
container = textRange.parentElement();
}
}
if (newContainer) {
return newContainer.nodeName;
}
else {
alert("Container object for the selection is not …Run Code Online (Sandbox Code Playgroud) 我有这个字符串:
a\,bcde,fgh,ijk\,lmno,pqrst\,uv
Run Code Online (Sandbox Code Playgroud)
我需要一个JavaScript函数,将每一个分割字符串,,但只有那些不具有\在他们面前
如何才能做到这一点?
我有这张桌子
<table id="tblId">
<thead>
<tr>
<th>View Name</th>
<th>View Description</th>
</tr>
</thead>
<tbody>
<tr id="1">
<td>Name</td>
<td><span onclick="jsFunction()">description</span></td>
</tr>
<tr id="2">
<td>Name</td>
<td><span onclick="jsFunction()">description</span></td>
</tr>
</tbody>
</table>
Run Code Online (Sandbox Code Playgroud)
在每个span的onclick事件中,我需要向js函数发送该特定行的行id,我该怎么做?
谢谢!
嗨,我的网站上有一个iframe,当点击一个按钮时,我需要在iframe外面的div中写入内容,这不适用于常规
$('#id').html("write something");
Run Code Online (Sandbox Code Playgroud)
任何想法如何做到这一点?非常感谢你
我在javascript中有一个数组,我需要把它带到我的c#webMethod.做这个的最好方式是什么?
我的c#代码是这样的:
[WebMethod]
public static void SaveView(string[] myArray, string[] filter)
{
}
Run Code Online (Sandbox Code Playgroud)
编辑 -
我的json数据如下所示:
{"myArray":[{"name":"Title","index":"Title","hidden":false,"id":"1","sortable":true,"searchoptions":{"sopt":["cn","eq","bw","ew"]},"width":419,"title":true,"widthOrg":150,"resizable":true,"label":"Title","search":true,"stype":"text"},{"name":"Author","index":"Author","hidden":false,"id":"3","sortable":true,"searchoptions":{"sopt":["cn","eq","bw","ew"]},"width":419,"title":true,"widthOrg":150,"resizable":true,"label":"Author","search":true,"stype":"text"}]}
Run Code Online (Sandbox Code Playgroud)
但我不工作......任何想法为什么?
非常感谢你.
我需要用jquery检查一个锚元素只有文本,而不是任何其他标签(img,b)或其他任何东西.
<a href="">TV</a>
Run Code Online (Sandbox Code Playgroud)
应该找到,但是:
<a href=""><img /></a>
Run Code Online (Sandbox Code Playgroud)
要么:
<a href=""><span>TV</span></a>
Run Code Online (Sandbox Code Playgroud)
或者任何其他HTML标记都不应该找到.
我该怎么做呢?
提前致谢.
我在我的asp.net网站上集成了Paypal,它在某些计算机上完美运行,而其他计算机则不然.
编辑:发现问题,但寻找解决方案
问题是如下:
事情似乎工作正常,我可以用paypal支付,然后当它调用GetExpressCheckoutDetails时,它返回10411错误 ' 此快速结账会话已过期'
我用以下代码调用GetExpressCheckoutDetails:
public bool GetDetails(string token, ref NVPCodec decoder, ref string retMsg)
{
if (bSandbox)
{
pendpointurl = pendpointurl_SB;
host = host_SB;
SetCredentials(APIUsername_SB, APIPassword_SB, APISignature_SB);
}
NVPCodec encoder = new NVPCodec();
encoder["METHOD"] = "GetExpressCheckoutDetails";
encoder["TOKEN"] = token;
string pStrrequestforNvp = encoder.Encode();
string pStresponsenvp = HttpCall(pStrrequestforNvp);
decoder = new NVPCodec();
decoder.Decode(pStresponsenvp);
string strAck = decoder["ACK"].ToLower();
if (strAck != null && (strAck == "success" || strAck == "successwithwarning"))
{
return true;
}
else …Run Code Online (Sandbox Code Playgroud) 我正在尝试建立一个网站,因为我可以使用API从我的Shopify商店获取所有信息.
我从这里下载了.NET示例,并在配置文件中添加了我的API密钥和密钥,当我在输入我的网站名称后运行测试应用程序时,它将我重定向到我的商店的shopify.com控制面板但是我写了在屏幕上'似乎发生了错误',它说:
无效请求:Shopify API应用程序不支持oauth
如果有人可以试着帮助我并指导我找到问题,我会适当的.
谢谢