gpt4 book ai didi

javascript - 谷歌浏览器 - JS 和 CSS 问题

转载 作者:太空宇宙 更新时间:2023-11-04 15:26:23 26 4
gpt4 key购买 nike

这是网站地址http://okcpirot.rs/prijava首先是 JS 问题:

JS 在除 Chrome 之外的所有浏览器中都可以工作,我不知道为什么。在这里我得到错误:

Uncaught TypeError: Object [object Object] has no method 'on prijava:142'

第二个问题是关于 CSS。右上角的箭头应该在前面(用于打开和关闭登录区域)。除了 Chrome 之外的所有浏览器都是这种情况。我再一次没有线索。

这部分的CSS代码:

#top_area {background: rgba(0,0,0,.8); padding: 10px 0; position: fixed;width: 100%; top:0; z-index: 1000}
#login{float: right;}
#login {margin-right: 40px}
#login label {color:#F2F2F2;display: block; float: left; margin: 0 10px}
#login input {float: left; border: none;border-top: 1px solid #555; border-bottom: 1px solid #333; padding: 2px 5px;}
#login input:focus, .lozinka input {box-shadow: inset 0px 0px 2px rgba(0,0,0,.4)}
#login input[type=submit] {margin-left: 10px; }
#login input[type=submit]:hover, .lozinka input[type=submit]:hover {box-shadow: inset 0px 0px 3px rgba(0,0,0,.5)}
.kreiraj_nalog{width: 16px;height: 16px;float: left;background: url(../img/resursi/kreiraj_novi_nalog.png) no-repeat;padding-right: 5px;}
.zaboravljena_lozinka{width: 16px;height: 16px;float: left;background: url(../img/resursi/zaboravljena_lozinka.png) no-repeat;padding-right: 5px;}
.top_area_links {float: right;clear: both;color:#F2F2F2 !important;padding-top: 5px; }
.top_area_links a {float: right; color:#F2F2F2 !important; margin-right: 5px;}

.korisnik{float: right;margin-right: 40px;padding: 11px;}
.korisnik p, .korisnik a {float: left;clear: none; color: #f2f2f2; margin: 0 5px;}
.korisnik a:hover {color: #f2f2f2;text-decoration: underline;}


.top_area_maska {position: fixed;width: 100%; top:0;}
.zatvori_top{float: right;width: 32px;height: 32px;background: url(../img/resursi/zatvori_otvori_top.png) no-repeat;display: inline-block;margin-top: 5px;position: relative;z-index: 100000;}
.zatvori_top:hover{background: url(../img/resursi/zatvori_otvori_top.png) -32px 0 no-repeat;cursor: pointer;}
.otvori_top{background-position: 0px -32px }
.otvori_top:hover{background-position: -32px -32px }
.top_area_links a:hover {text-decoration: underline;}

HTML 部分:

<div class="top_area_maska clearfix">
<div class="container_12 clearfix">
<div class="zatvori_top <?php if($this->session->userdata('toggle_top') == TRUE ) echo 'otvori_top'?>"></div>
</div>
</div>
<div id="top_area" class="clearfix" <?php if($this->session->userdata('toggle_top') == TRUE ) echo 'style="display: none"'?>>
<div class="container_12">
<?php
if($this->session->userdata('is_logged_in') == FALSE) :
$attributes = array('id' => 'login', 'class' => 'clearfix');
$hidden = array('current_page' => current_url());
echo form_open('korisnik/validacija', $attributes, $hidden);
?>
<label for="email">Email</label>
<input type="email" name="email" id="email" placeholder="Email" autocomplete='off' />
<label for="pass">Lozinka</label>
<input type="password" name="pass" id="pass" placeholder="Lozinka" autocomplete='off' />
<input role=prijava type="submit" name="submit" value="Prijavi Se">
<div class="top_area_links clearfix">
<a class=""href="<?php echo base_url('prijava') ?>" role=nalog><span class="kreiraj_nalog"></span>Kreiraj Nalog</a>
<a href="<?php echo base_url('prijava') ?>" role=lozinka><span class="zaboravljena_lozinka"></span> Zaboravljena Lozinka | </a>
</div>
<?php echo form_close();
else :
?>
<div class="korisnik">
<p><?php echo $this->session->userdata('full_name') ?> | </p>
<a href="<?php echo base_url() ?>korisnik/nalog/<?php echo str_replace(' ', '_', $this->session->userdata('full_name')) ?>/<?php echo $this->session->userdata('id_user') ?>">Moj Nalog | </a>
<a href="<?php echo base_url() ?>korisnik/odjava">Odjavi se</a>
</div>
<?php endif; ?>
</div>
</div>

是某种黑魔法在起作用还是 Chrome 快要疯了?

最佳答案

在 Chrome 中,它显示名为 name 的变量实际上是一个包含“[object Object]”的字符串。它在设置为 .find("#ime") 之前已经具有此值。这似乎是一个全局范围界定问题。我建议将变量的名称更改为不太常见的名称。

关于javascript - 谷歌浏览器 - JS 和 CSS 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13982497/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com