WeChat web version onclick event does not work

My mistake was splicing the url in the jumped url, as follows:

var myBaseUrl="https://xxx/";
    function do() {
	$.ajax({
		url :myBaseUrl+"wechat/weChatUntie.action",
		cache : false,
		dataType : "json",
		type: "POST",
                .................
<button id="Untie"     class="btn"  onclick="do()">解绑账号</button><br/><br/>

Just change the posture, save the complete url of the splicing into a variable, and then access it:

<script type="text/javascript"   charset="UTF-8">
	var myBaseUrl="https://'xxx'";
	function  do() {
	$.ajax({
	    url: myBaseUrl,
		cache : false,
		dataType : "json",
		type: "POST",
        .................
	}
</script>

Wasted a morning, just such a broken question, hereby record!

over!

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326268441&siteId=291194637