JS的跳转
需要在下面的button中实现跳转,之前直接写了个<a>标签,但是在手机上的效果太差了,这是老大写的js跳转。记下来,要学会贯通。
<div class="ps-lt"> <div class="lt-dsb"> <p> <span style="padding: 150px"> <input type="button" value="编辑资料" class="updateButton" onclick="Navigate()" /> </span> </p> </div> </div>
是放在了js中让其进行跳转。
<script type=text/javascript> function Navigate() { window.location.href = '@Url.Action("Update", "Customer")'; } </script>
这样就直接可以跳转了。
下面是我写的。
<a href="@Url.Action("Update", "Customer")" style="padding: 90px;"> <input type="button" value="编辑" style="background-color: peru; width: 45px; height: 30px;" /> </a>
就是因为这个<a>标签,导致在用户修改完数据返回来的时候,会把下滑线变粗,变黑。
作者:阿辉
关注我:微信扫描下面二维码,关注后6T编程资料免费送。
微信公众号:Andy阿辉
![关注公众号,获取最新更新](https://images.cnblogs.com/cnblogs_com/netxiaohui/1894145/o_210419003737zaishuoahui.jpg)
![关注公众号,获取最新更新](https://images.cnblogs.com/cnblogs_com/netxiaohui/1894145/o_210419003737zaishuoahui.jpg)
写一些程序员的所思所想,希望对你有帮助。
版权声明:本文版权归作者和博客园共有,欢迎转载,
但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利.
但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利.