Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/363.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 仅在首次访问时显示>;如果(!localStorage.getItem(";runOnce";){trigger锚链接_Javascript_Jquery - Fatal编程技术网

Javascript 仅在首次访问时显示>;如果(!localStorage.getItem(";runOnce";){trigger锚链接

Javascript 仅在首次访问时显示>;如果(!localStorage.getItem(";runOnce";){trigger锚链接,javascript,jquery,Javascript,Jquery,我有一个javascript表单,可以进行一些计算,但我只想在访问者第一次进入网站时显示它 我试图在我的代码之前添加 jQuery(document).ready(function($) { if( ! localStorage.getItem( "runOnce" ) ) { 我需要触发一个链接,而不是runOnce。你能给我一些建议吗???我正在从0学习…谢谢JQuery支持“单击”、“提交”或“触发”方法,可用于触发操作。假设你能识别表单本身(触发“提交”操作)或“单击”表单中的s

我有一个javascript表单,可以进行一些计算,但我只想在访问者第一次进入网站时显示它

我试图在我的代码之前添加

jQuery(document).ready(function($) {
   if( ! localStorage.getItem( "runOnce" ) ) {
我需要触发一个链接,而不是runOnce。你能给我一些建议吗???我正在从0学习…谢谢

JQuery支持“单击”、“提交”或“触发”方法,可用于触发操作。假设你能识别表单本身(触发“提交”操作)或“单击”表单中的submit按钮可能类似于:

// force the form identified as id=myform to submit
$("#myform").submit();

// or click the submit button on the form
$("#mysubmitbutton").click();
提交(): click():

JQuery支持“单击”、“提交”或“触发”方法,可用于启动操作。假设您可以识别表单本身(启动“提交”操作)或“单击”表单中的“提交”按钮,则它可能类似于:

// force the form identified as id=myform to submit
$("#myform").submit();

// or click the submit button on the form
$("#mysubmitbutton").click();
提交(): click():

JQuery支持“单击”、“提交”或“触发”方法,可用于启动操作。假设您可以识别表单本身(启动“提交”操作)或“单击”表单中的“提交”按钮,则它可能类似于:

// force the form identified as id=myform to submit
$("#myform").submit();

// or click the submit button on the form
$("#mysubmitbutton").click();
提交(): click():

JQuery支持“单击”、“提交”或“触发”方法,可用于启动操作。假设您可以识别表单本身(启动“提交”操作)或“单击”表单中的“提交”按钮,则它可能类似于:

// force the form identified as id=myform to submit
$("#myform").submit();

// or click the submit button on the form
$("#mysubmitbutton").click();
提交():
click():

数据幻灯片标记是特定JS脚本的自定义标记。当然,这是在网站中实现“滑动”效果的代码。我一直在检查网站。请使用“关于”按钮

您有一个about按钮,可以滑动到容器834。将id
about btn
添加到其中,如下所示:

<a id="about-btn" href="http://www.inlovewithdeath.com/about-satish-modi-the-author/" class="menu-item menu-item-type-post_type menu-item-object-page" data-slide="container-834" data-name="about-satish-modi-the-author">About</a>

我建议先学习纯JS/vanilla JS,然后再使用框架了解其主要思想。

数据幻灯片标记是特定JS脚本的自定义标记。当然,这是在网站中实现“滑动”效果的代码。我一直在检查网站。使用“关于”按钮

您有一个about按钮,可以滑动到容器834。将id
about btn
添加到其中,如下所示:

<a id="about-btn" href="http://www.inlovewithdeath.com/about-satish-modi-the-author/" class="menu-item menu-item-type-post_type menu-item-object-page" data-slide="container-834" data-name="about-satish-modi-the-author">About</a>

我建议先学习纯JS/vanilla JS,然后再使用框架了解其主要思想。

数据幻灯片标记是特定JS脚本的自定义标记。当然,这是在网站中实现“滑动”效果的代码。我一直在检查网站。使用“关于”按钮

您有一个about按钮,可以滑动到容器834。将id
about btn
添加到其中,如下所示:

<a id="about-btn" href="http://www.inlovewithdeath.com/about-satish-modi-the-author/" class="menu-item menu-item-type-post_type menu-item-object-page" data-slide="container-834" data-name="about-satish-modi-the-author">About</a>

我建议先学习纯JS/vanilla JS,然后再使用框架了解其主要思想。

数据幻灯片标记是特定JS脚本的自定义标记。当然,这是在网站中实现“滑动”效果的代码。我一直在检查网站。使用“关于”按钮

您有一个about按钮,可以滑动到容器834。将id
about btn
添加到其中,如下所示:

<a id="about-btn" href="http://www.inlovewithdeath.com/about-satish-modi-the-author/" class="menu-item menu-item-type-post_type menu-item-object-page" data-slide="container-834" data-name="about-satish-modi-the-author">About</a>


我建议先学习纯JS/vanilla JS,然后再使用框架来了解一切是如何工作的。

触发链接…这是什么意思?你可以使用
window.location=somewhere.html;
你的问题不清楚。你能详细解释一下第一次运行代码时会发生什么吗?我现在在t他假设您的页面上有一个“计算器”,可以从表单中获取其值。您不需要将其提交给服务器,只需调用从表单中提取值的函数即可执行计算(例如,
).对吗?有效!!!!!我添加了目标自我及其工作完美谢谢!!现在我学到了一些新的东西…触发器链接…这意味着什么?你可以使用
window.location=somewhere.html;
你的问题不清楚。你能详细解释一下代码第一次运行时会发生什么吗?我将使用as假设您的页面上有一个“计算器”,可以从表单中获取其值。您不需要将其提交给服务器,只需调用从表单中提取值的函数即可执行计算(例如
).对吗?有效!!!!!我添加了目标自我及其工作完美谢谢!!现在我学到了一些新的东西…触发器链接…这意味着什么?你可以使用
window.location=somewhere.html;
你的问题不清楚。你能详细解释一下代码第一次运行时会发生什么吗?我将使用as假设您的页面上有一个“计算器”,可以从表单中获取其值。您不需要将其提交给服务器,只需调用从表单中提取值的函数即可执行计算(例如
).对吗?有效!!!!!我添加了目标自我及其工作完美谢谢!!现在我学到了一些新的东西…触发器链接…这意味着什么?你可以使用
window.location=somewhere.html;
你的问题不清楚。你能详细解释一下代码第一次运行时会发生什么吗?我将使用as假设您的页面上有一个“计算器”,可以从表单中获取其值。您不需要将其提交给服务器,只需调用从表单中提取值的函数即可执行计算(例如
).是吗?很好!!!!!我添加了目标自我及其工作完美,谢谢!!现在我学到了一些新东西…我需要跳转到一个带有以下“传统信息”的内部链接,以便它可以滑动target=“\u self”href=“/”数据幻灯片=“关于satish modi作者如何将此信息添加到location href???这是一个带有
id
container-834
的容器,所以使用location.href+='#container-834'。我尝试过,它可以工作,但出于某种原因,主题有一个脚本,只有在数据幻灯片信息